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.