Hello,
I have written a Python script that constantly checks for incoming
connections. It is a class and runs a while loop until shutdown is set to
True. Something like:
class Connection(object):
def __init__(self):
self.shutdown = False
def mainloop(self):
while not self.shutdown:
print "We keep checking..."
I have written a GUI and when I click the Quit-button, I do
"connection.shutdown = True", which works great.
The plans are to run this on my webserver. I created a webpage with a start
and stop button, the starting works great. But how could I remember this
class to call "class.shutdown = True" any given time when I press the stop
button?
Cheers,
Timo
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor