Python Service & PGP

Q emailoffline at hotmail.com
Fri May 10 13:22:44 EDT 2002


Hi David

That would be great.

I know that there are limitations with using os.popen within a GUI
environment. But it doesn't work as a NT Service either. I tried several
wrappers from Microsoft SRVANY, AtYourService, and PrismMicrosys and all of
which has the same results. It doesn't shell out to command line.

I want to convert a Python Script to run as an NT Service. The script looks
for files in an incoming directory and moves them to an outbound directory
for PGP encryption.

I followed

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

It 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.

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.




"dsavitsk" <dsavitsk at e-coli.net> wrote in message
news:zAIC8.12280$d7.4191169 at newssrv26.news.prodigy.com...
> i have a project that is a python service that interacts with other
modules,
> so it might be helpful.  it will be at http://ecpspooler.sourceforge.net
one
> of these days ... the start of the documentation is there now.  if you are
> interested, i'll send you the code.
>
> -d
>
>
> "Q" <emailoffline at hotmail.com> wrote in message
> news:QIfC8.129$lc.32 at nwrddc03.gnilink.net...
> > 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