[Twisted-Python] New scripts

Juergen Hermann j.her at t-online.de
Tue Mar 19 16:29:12 EST 2002


mktap is now fully moved to twisted.scripts. Would be nice if people
moved the commands they use the most, or are related to the part they

What to do:

 1. Copy the code of the command to twisted/scripts/command.py. Then
first commit it unchanged, so there is a clear history!

 1. Move as much code as possible into a function named run(); try to
avoid top-level code if you can, since that is a problem for doc-tools,
pychecker, etc.

 2. Replace the command in bin/command by its stub, i.e. by the new
preamble + the import/run() combo. Don't skip this step, since
otherwise ppl will start to edit at two places, which leads to chaos!

See bin/mktap and twisted/scripts/mktap.py for an example.

In the long run, especially when all commands are moved, be can remove
the bin directory, since it's created in build/scripts anyway. For now,
it allows smooth transition.

Ciao, Jürgen

More information about the Twisted-Python mailing list