[Twisted-Python] Re: Debugging client programs
Bob Ippolito
bob at redivi.com
Wed Jul 30 14:59:56 MDT 2003
On Wednesday, July 30, 2003, at 4:45PM, John Goerzen wrote:
> 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.
Look at itamar's post
>
> 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.
twistd does this when you start the tap.. man twistd
>
> 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.
make a shell script called offlineimap that runs twistd offlineimap.tap
instead of python.
-bob
More information about the Twisted-Python
mailing list