[Twisted-Python] Re: Debugging client programs

John Goerzen jgoerzen at complete.org
Wed Jul 30 14:45:02 MDT 2003


Moshe Zadka <m at moshez.org> writes:

>> twistd, has no TAP, etc.  What is the framework for enabling debugging
>> for that?  And could it be documented in the howto?
>
> You are deluded.
> There is absolutely no excuse not to run with twistd. There is no need
> for a TAP file: a .tac file (that is, a Python file which defines a variable
> named Application) would do just as well. Then, twistd -bony file.tac,
> and presto! debuggy goodness.

That all sounds good, but how to do it?  What does this variable named
Application store?  I have looked at the HOWTOs (which all refer to
objects of type Application) and the APIs, all of which talk about
listening on ports, features of twistd related to running in the
background or not, etc.

Nothing shows how this is to be done with a client.

What's worse, the application HOWTO also doesn't show how to choose
which reactor one is using, which is going to be a critical issue for
me.  I have all these things solved outside the twistd/Application
framework, but am not sure how to do it inside that framework.

Also, I have no objection to running twistd for my debugging, but my
excuse to not running twistd for end-users is that they should not
have to run "twistd /usr/bin/offlineimap" -- they should just run
offlineimap and invoke Python directly.

So, I may be deluded, but hopefully you can see why.

-- John





More information about the Twisted-Python mailing list