[Twisted-Python] How to package a program that I'm running as twistd dmucs.py

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Aug 30 10:00:59 MDT 2010


On Aug 30, 2010, at 11:51 AM, Victor Norman wrote:

> Can someone recommend the correct way to package up my application so that it can be run by typing 
> 
> dmucsd 
> 
> ?
> 
> Thanks.
> 
> Vic

The best way to do this is to write a twistd plugin (so your script can process its own arguments) and then have a wrapper that loads that plugin via the 'twistd' module and executes it.

See here: <http://divmod.org/trac/browser/trunk/Axiom/axiom/scripts/axiomatic.py>

and here:
<http://divmod.org/trac/browser/trunk/Axiom/twisted/plugins/axiom_plugins.py>

for examples.



More information about the Twisted-Python mailing list