|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello!
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 os.system("hello.exe") 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... ah new |
|
#2
|
||||
|
||||
|
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. grim ![]()
__________________
*** Experimental Python Markup CGI V2 *** |
|
#3
|
|||
|
|||
|
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? ah new... |
|
#4
|
|||
|
|||
|
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.
Cheers, K ps: don't forget to format the code properly in your post. |
|
#5
|
|||
|
|||
|
yeah!
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... the traceback... 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 ... |
|
#6
|
|||
|
|||
|
Howdy
I have no personal experience in the matter but I bet this will help: http://www.oreillynet.com/cs/user/view/cs_msg/22143 Good luck, K ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > py2exe cant work in services? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|