passing object between classes
daved170
daved170 at gmail.com
Mon Sep 21 07:19:21 EDT 2009
Hi everybody,
I built my owen log obj as a class.
I'm passing it to another object (actually to a thread).
When I run my app it raise error at the line when I'm using that log
obj. is there any problem with the concept of passing object as I do
it?
How can I do that?
class A:
def foo1:
myLog = cLog()
myYhread = cThread(myLog)
myThread.start()
class cThread:
def __init__(self,in_myLog):
sel.LogObj = in_myLog
def run():
sel.LogObj.writeLine("HI")
thanks
Dave
More information about the Python-list
mailing list