[Twisted-Python] Help, I've run and I can't fall down!

Kevin Turner acapnotic at twistedmatrix.com
Sat Oct 13 17:37:10 EDT 2001

On Fri, Oct 12, 2001 at 11:48:01AM -0700, Kevin Turner wrote:
> Okay.  Someone wanna explain to me why this script prints 
> "Duplicate Shutdown Ignored." and sits there instead of exiting?

Content-Description: cvstoys/fresh-loginfo.py
> def connected(object):
>     object.trackPid(cvs_pid, cvsroot, file)
>     main.shutDown() # sys.exit(0)
> pb.getObjectAt("unix", path.join(cvsroot, 'CVSROOT',".freshcvs"),
>                connected, aint)
> main.run()

Ok, after a spending a little time in that hideous monstrosity which
Python calls a debugger, I found the answer.
the callback 'connected' is called before main.run() is.

Does this mean I never have to run() at all?

Kevin Turner <acapnotic at twistedmatrix.com> | OpenPGP encryption welcome here
The moon is waning cresent, 14.3% illuminated, 25.9 days old.

More information about the Twisted-Python mailing list