Python Service

Q emailoffline at hotmail.com
Wed May 8 16:16:48 EDT 2002


I want to convert a Python Script to run as an NT Service. The script uses
an infinite while loop to poll the incoming directory for files. It them
moves them to the outbound directory and encrypts them using PGP.

I followed

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q137890

This utilitiy starts the service and it moves the files to the outbound
directory. However it fails to encrypt or decrypt. I know the encrypt string
works because I have it logged to file which I used to test in DOS command
shell. The script also works completely when executed manually.

It seems that the SRVANY wrapper fails at the line where the Python script
shells out to command line to run the PGP script.

The shell out command is

    "os.popen(strEncrypt)"

strEncrypt is defined as a PGP string to encrypt.

Can anyone provide ideas?

Thanks.





More information about the Python-list mailing list