[python-win32] Windows service using py2exe
Antony Joseph
antonyjoseph89 at gmail.com
Mon May 14 14:23:01 CEST 2012
Hi all,
I converted my python project to a service. When using the usual
options of install and start/stop, everything works correctly.
When I compile the project using py2exe,
>test.exe install
Installing service test
>test.exe start
Starting service test
- But it not actually get started
When i run it in debug mode,
>test.exe debug
Starting service Test
C:\Documents and Settings\admin\Desktop>test.exe debug
Debugging service Test - press Ctrl+C to stop.
Traceback (most recent call last):
File "boot_service.py", line 185, in <module>
File "win32serviceutil.pyc", line 611, in HandleCommandLine
File "win32serviceutil.pyc", line 447, in DebugService
File "test.pyc", line 28, in __init__
WindowsError: [Error 267] The directory name is invalid:
'C:\\Documents and Settings\\admin\\Desktop\\sharefolder\\test.e
xe'
Code:
test = Target(
description = 'Test Service',
modules = ['test'],
cmdline_style='pywin32'
)
setup(
options = {"py2exe": {"compressed": 1, "bundle_files": 1, "ascii":
1, "packages": ["encodings"]} },
console=["test.py"],
zipfile = None,
service=[test]
)
More information about the python-win32
mailing list