[Twisted-Python] question about twisted conch (SSH) and wxPython

Bob Ippolito bob at redivi.com
Mon Jul 18 03:37:41 EDT 2005


On Jul 17, 2005, at 9:02 PM, Astan Chee wrote:

> Whoops,
> I forgot to add the wantReply=1 there...
> anyway, Another question I have is if the password is incorrect,  
> quit the python script...
>
> currently the getPassword function looks like this
> RETRIES = 0
> def getPassword(self):
>        global RETRIES
>        if RETRIES  == 0:
>            RETRIES = 1
>            return defer.succeed(PASSWORD)
>        else:                      sys.exit(0)

reactor.stop() is what you want here.

-bob





More information about the Twisted-Python mailing list