[Twisted-Python] tap2ntsvc in sandbox

Cory Dodt corydodt at twistedmatrix.com
Wed Nov 12 03:05:42 EST 2003


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

Twisted/sandbox/moonfallen/tap2ntsvc.py

If you have an Twisted application that you want to make into a service
on Windows, give this a try.  It's very basic right now; it absolutely
needs py2exe and Inno setup support before I'll consider it done.  The
goal is to have the output be a complete binary package analogous to the
output of tap2deb or tap2rpm.  The only difference will be that, instead
of depending on software like the Linux versions do, it will do as much
as it can to help you include the dependencies in the package using py2exe.

Right now, nothing beyond generating a service script is done.  Here's
the help:

Usage: tap2ntsvc.py [options] <filename>
Options:
~  -y, --type=          Config file type: pickle, xml, source, or python
~  -o, --output-file=   Name of the setup executable produced
~  -n, --name=          Short name of the service (used with "net start")
~  -d, --display-name=  Human-readable name of the service
~  -e, --description=   Description of the service
~  -r, --reactor=       Reactor to install (like twistd) [default: default]
~      --version
~      --help           Display this help and exit.

Do something like . . .

| python tap2ntsvc.py myapp.tac

The output is myappsvc.py (or <name>svc.py).  Then you run myappsvc.py:

| python myappsvc.py install
Installing service myapp to Python class
C:\myapp\myappsvc.myapp_ServiceControl
Changing service configuration
Service updated

| net start myapp
The myapp run by Twisted service is starting.
The myapp run by Twisted service was started successfully.


Give it a try, let me know if you have any problems with it.

Thanks,

C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQE/senW3A5SrXAiHQcRAvNdAJ4n7+yfvB/kcKD1pfGjfgqDbFgqcACcCDYZ
jqd+gw+guZ3xg4f5R6I8tIQ=
=kTlI
-----END PGP SIGNATURE-----




More information about the Twisted-Python mailing list