[Twisted-Python] How to package a program that I'm running as twistd dmucs.py
![](https://secure.gravatar.com/avatar/71b998c7a17c613a60338d63b0f1a29f.jpg?s=120&d=mm&r=g)
I am nearing the end of developing my application and am thinking about how to package it up. I have been testing it by running it this way: twistd -ny dmucs.py I was hoping I could just rename my dmucs.py to dmucsd and then put this in the first line of the file: #!/bin/env twistd -ny (or whatever other args instead of -ny) But, this isn't working for me. Can someone recommend the correct way to package up my application so that it can be run by typing dmucsd ? Thanks. Vic -- “A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.” -- Antoine de Saint Exupéry
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Aug 30, 2010, at 11:51 AM, Victor Norman wrote:
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.
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Aug 30, 2010, at 11:51 AM, Victor Norman wrote:
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.
participants (3)
-
Glyph Lefkowitz
-
Jason J. W. Williams
-
Victor Norman