November 30th, 2004, 07:20 PM
py2exe cant work in services?
i was wrote some script in python (hello.py)
then, i was convert it into .exe file with py2exe (hello.exe)
then, i try to call the .exe inside a window service code with
but i found that it doesnt work when i execute the service!
my question is what are the reasons that cause the "call exe" cant work?
i'm using py2.3 + winXP Pro
thanks for advice...
December 1st, 2004, 03:40 AM
From your cross post it looks like your service has failed to import the os module. Have you looked at the import os statement in your code.
My reference book suggests that services should only communicate using Windows NT Event log or via simple dialogs.
I'm guessing here but I don't think services will have stdout or stdin which means that printing and input will fail - any print statments before your import os command could cause you problems. This might also apply to sub-processes.
December 1st, 2004, 06:58 PM
the "import os" is the 1st line in my program ("hello.py")
the problem is seems all imported cant be load when i convert the file to .exe ("hello.exe")
any other ideas?
December 2nd, 2004, 03:42 AM
Pasting the code would help.
It sounds like you're dealing with relatively simple programs. Why not just paste the code here, I'm betting there's a tiny bug somewhere waiting to be squished.
ps: don't forget to format the code properly in your post.
December 2nd, 2004, 07:41 PM
the problem been solve after i add the library zip file inside the dist folder to the sys path.
but another problem was come to surface...
File "xml\sax\sax2exts.pyc", line 37, in make_parser
File "xml\sax\saxexts.pyc", line 77, in make_parser
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found
any ideas about it?
ps: i was installed PyXML..
thanks for advices ;-)
ah new ...
December 3rd, 2004, 03:09 AM
I have no personal experience in the matter but I bet this will help: