Re: where are the "class variables"?
by Tom Hanks other posts by this author
Oct 1 2003 1:16AM messages near this date
Re: where are the "class variables"?
|
Re: where are the "class variables"?
Access class members... as members of the class! :)
class Server(threading.Thread):
running = 0
def run(self):
Server.running = 1 # note added "Server."
while Server.running: # ditto, added "Server."
print "do something here..."
def exit(self):
Server.running = 0 # ditto, added "Server."
TTFN,
Tom.
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Dominik Kaspar
Gerrit Holl
Gerrit Holl
Tom Hanks
John Roth
Bob Gailer
|