[python-win32] Threading Issue

Bob Gailer bgailer at alum.rpi.edu
Thu Jul 5 01:42:29 CEST 2007


Following is untested but based on other work I've done:

import threading

class Foo:
    def __init__(self):
       self.list = []
    def run(self):
       # manipulate the list from within the thread

foo = Foo()
threading.Thread(target = foo.run)
...
foo.list # access the list as modified by the thread


-- 
Bob Gailer
510-978-4454 Oakland, CA
919-636-4239 Chapel Hill, NC



More information about the Python-win32 mailing list