thread question

Jason Orendorff jason at jorendorff.com
Sun Feb 24 23:56:39 EST 2002


max wrote:
> can i acces attributes, or functions of a thread(like if i started 
> the class with threading.Thread(None, someclass)) like i can access 
> classes? and if yes how? if no, how can i do it in another way?

You probably want something like this.

class SomeClass(threading.Thread):
    def run(self):
        ...
        ... Here you can access attributes and methods 
        ... of self, which is a Thread object.
        ...

myThread = SomeClass()
myThread.start()

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list