[Twisted-Python] passing command line args to twistd daemons

Siegmund Fuehringer sifu-twisted at 0xx0.net
Fri Aug 19 01:56:58 EDT 2005


On Thu, Aug 18, 2005 at 03:29:13PM -0400, Garry Hodgson wrote:
> 
> i've got an application (invoked via: twistd -noy fpc.py) that i'd
> like to use for multiple purposes by passing command line arguments.
> when i do so, twistd objects that they are invalid arguments.  i'd
> hoped for some magic arg that partitions the args into twistd
> arguments and app arguments, something like:
> 
>     twist -noy fpc.py -- -x -y -z
> 
> but no such luck.
> 
> so, is there a way to accomplish this?  if not, what is the
> preferred mechanism for customizing an application's
> behavior at startup time?

i would use environment variables:
env "X=1" twistd -noy fpc.py

--
sifu




More information about the Twisted-Python mailing list