'''
This code use python threading syntax
- Save this class named 'ThreadClass.py'
'''
import threading
import time
class ThreadClass(threading.Thread):
def __init__(self,data):
threading.Thread.__init__(self)
self.data=data
def run(self):
for i in range(0,3):
print "output: ",self.data
time.sleep(1);
Thursday, October 28, 2010
Python Threading
Posted by
Abu Zahed Jony
at
3:07 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels:
Object-oriented programming,
Thread
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment