passing argumetns to threading.Thread

sashan mabus at operamail.com
Sat Oct 4 22:06:14 EDT 2003


I'm trying to pass arguments to my the run method of my class  that 
inherits from threading.Thread.

class Reader(threading.Thread):
	def __init__(self, conn):
		threading.Thread.__init__(self, None, None, None, (conn))
		
	def run(self,conn):		
		while 1:
			data = conn.recv(1024)
			print data





More information about the Python-list mailing list