[Twisted-Python] Sending arguments to application

Cory Dodt corydodt at twistedmatrix.com
Wed May 25 11:03:32 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That's just not how twistd -y works.  The argument is supposed to be something
called a "TAC" file, which is just a config file that happens to have Python
syntax.  In other words, you put your arguments inside it.  You can name the
file .py if you want to, but conceptually it's still supposed to be a config file.

If you want another way of configuring your application, you need to provide
your own main entry point, and use something (probably twisted.python.usage)
to process the command-line arguments.

C


Roland Hedberg wrote:
| Hi!
|
| I using the variant "twistd -y foo.py" and I would like to be able to
| send arguments to foo.py in the same command.
|
| The preferable way would be something like
|
| "twistd -y foo.py arg1 arg2"
|
| But that doesn't work, twistd complains.
|
| If it can be done some other way, how ?
|
| -- Roland
|
| _______________________________________________
| Twisted-Python mailing list
| Twisted-Python at twistedmatrix.com
| http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFClJPE3A5SrXAiHQcRAmEOAJ9uzbwF0rVjL7z1S3xPry3DHwPQngCgpp1K
oE33gI5ZMR+E4doPe53XRUI=
=Ak7g
-----END PGP SIGNATURE-----




More information about the Twisted-Python mailing list