Python

The Python Programming Language

Python threads: Communication and Stopping



This content is part of the Python Zone, which is presented to you by DZone and New Relic. Visit the Python Zone for news, tips, and tutorials on the Python programming language.  provides the resources and best practices to help you monitor these applications.

A very common doubt developers new to Python have is how to use its threads correctly. Specifically, a large amount of questions on StackOverflow show that...

0 replies - 408 views - 01/21/12 by Eli Bendersky in Articles

Lazy Descriptors in Python

Today I had a need to create a property on an object "lazily." The Python builtin property does a great job of this, but it calls the getter...

2 replies - 2279 views - 01/20/12 by Rick Copeland in Articles

Face and Eye Detection in OpenCV

The goal of object detection is to find an object of a pre-defined class in an image. In this post we will see how to use the Haar Classifier implemented in...

0 replies - 903 views - 01/20/12 by Giuseppe Vettigli in Articles

Read-Ahead and Python Generators

One of the early classics of program design is Michael Jackson’s Principles of Program Design (1975), which introduced (what later came to be known as) JSP:...

0 replies - 493 views - 01/18/12 by Steve Ferg in Articles

Shared Counter with Python’s Multiprocessing

One of the methods of exchanging data between processes with the multiprocessing module is directly shared memory via multiprocessing.Value. As any method...

0 replies - 478 views - 01/17/12 by Eli Bendersky in Articles

Python Hello World, for a web application

python -m SimpleHTTPServer is a very handy command that sets up a server listening on a port (by default 8080) having as document root the current directory....

0 replies - 1031 views - 01/17/12 by Giorgio Sironi in Articles

How To: Plot a Function of Two Variables with matplotlib

In this post we will see how to visualize a function of two variables in two ways. First, we will create an intensity image of the function and, second, we...

0 replies - 765 views - 01/16/12 by Giuseppe Vettigli in Articles

Corner Detection with Python and OpenCV

Corner detection is an approach used within computer vision systems to extract certain kinds of features and infer the contents of an image [Ref]. We have...

0 replies - 714 views - 01/16/12 by Giuseppe Vettigli in Articles

Google Calendar Notifications Using Pynotify

I use Google Calendar to manage my calendars, and I really missed something to warn me whenever I have an appointment with an alert set. So here is an example...

0 replies - 1033 views - 01/14/12 by Julien Danjou in Articles

Using GTK+ stock icons with pynotify

It took me a while to find this, so I'm just blogging it so other people will be able to find it. I wanted to send a desktop notification using pynotify, but...

0 replies - 318 views - 01/13/12 by Julien Danjou in Articles

How To Do An Isolated Install of Brubeck

I wanted to install James Dennis’s Brubeck web framework, but lately I’ve become fanatical about installing nothing, nothing, in the system-wide...

0 replies - 283 views - 01/13/12 by A. Jesse Jiryu Davis in Articles

pyelftools: Python library for Parsing ELF and DWARF

I’m happy and proud to announce the release of a new open-source Python package to the world. pyelftools is a pure-Python library for parsing and analyzing...

0 replies - 323 views - 01/13/12 by Eli Bendersky in Articles

Cool Python Module: html2text

Parts of the Fiesta API (as well as some new features we’re rolling out for Fiesta itself) rely on the ability to automatically generate clean text...

0 replies - 600 views - 01/12/12 by Mike Dirolf in Articles

DZone's Bringing You More Python Awesomeness

Calling all Pythonistas (Pythonistos?) and Djangonauts! Did you know that Python is ranked 3rd behind Java and JavaScript as the programming language that...

0 replies - 3536 views - 01/11/12 by Mitchell Pronsc... in News

Tip: Python Variables and Typing

Never forget, Python uses duck typing and has typed objects but untyped variable names. lfc = "Liverpool" # this is a string manc = "Manchester...

0 replies - 887 views - 01/11/12 by Giuseppe Vettigli in Articles