Building a Windows NT service with py2exe
Adam Albrechtas
adam.albrechtas at equisure.ca
Thu Mar 27 13:38:46 EST 2003
Doh! Note to self: the Python Reference manual is your friend....
Thanks Mark!
Adam.
Mark Hammond <mhammond at skippinet.com.au> wrote in message news:<EOoga.7665$Ov1.54514 at news-server.bigpond.net.au>...
> Adam Albrechtas wrote:
> > I have coded a Windows NT service in Python 2.2. The service works
> > when running as a python script. I can use py2exe to roll it into an
> > .exe without specifying that it is a service (which means that the
> > .exe ultimately does not work but at least the process completes).
> > When I use py2exe while specifying a service build I receive the
> > following:
>
> ...
> > File "<string>", line 45
> > win32serviceutil.HandleCommandLine(NTAdminService)
> > ^
> > SyntaxError: invalid syntax
>
> My guess is that your script file simply does not have a \n at the end
> of the file. Python itself doesn't care about this, but exec does!
More information about the Python-list
mailing list