background preloader

Tutorial

Facebook Twitter

Reference

Django. Search. Metaclass. Opencv. Page 4 - Basic Threading in Python. There is more to threads than just spawning them and sending them on their way.

Page 4 - Basic Threading in Python

The threading module's Thread module contains a few more methods that you should be aware of. The first two deal with naming threads. The method setName sets a thread's name, and the method getName retrieves a thread's name: import threadingclass TestThread ( threading.Thread ): def run ( self ): print 'Hello, my name is', self.getName()cazaril = TestThread()cazaril.setName ( 'Cazaril' )cazaril.start()ista = TestThread()ista.setName ( 'Ista' )ista.start()TestThread().start() No suprises there. WordPy offline blogging tool. Topics covered in this tutorial: GladePyGTKgtk.FileChooserDialoggtk.FileFiltergtk.TextViewgtk.TextBuffergtk.TextMarkgtk.MessageDialog You can download the full source for this tutorial here.

WordPy offline blogging tool

Java J2EE Tutorials. Dictionary.Key() : Dictionary « MS JScript « JavaScript Tutorial. Array « JavaScript Tutorial.