[Python-de] py2exe und Services
Gerson Kurz
gerson.kurz at pergamon-software.de
Mon Okt 4 16:38:33 CEST 2004
mit der aktuellen py2exe Version habe ich ewig Probleme: praktisch alle
möglichen alten Skripten gehen nicht mehr. Aktuell möchte ich einen NT
Service bauen, aber:
D:\Scripts\2004\10\PasionIrgendwas>python setup.py py2exe
running py2exe
*** searching for required modules ***
Traceback (most recent call last):
File "setup.py", line 5, in ?
setup(service="pasionIrgendwas")
File "C:\python23\lib\distutils\core.py", line 149, in setup
dist.run_commands()
File "C:\python23\lib\distutils\dist.py", line 907, in run_commands
self.run_command(cmd)
File "C:\python23\lib\distutils\dist.py", line 927, in run_command
cmd_obj.run()
File "c:\python23\Lib\site-packages\py2exe\build_exe.py", line 167, in run
self._run()
File "c:\python23\Lib\site-packages\py2exe\build_exe.py", line 201, in
_run
self.find_needed_modules(mf, required_files, required_modules)
File "c:\python23\Lib\site-packages\py2exe\build_exe.py", line 907, in
find_n
eded_modules
mf.import_hook(mod)
File "C:\Python23\Lib\modulefinder.py", line 124, in import_hook
q, tail = self.find_head_package(parent, name)
File "C:\Python23\Lib\modulefinder.py", line 178, in find_head_package
raise ImportError, "No module named " + qname
ImportError: No module named p
natürlich! es gibt kein Modul "p", so ein modul importiere ich auch nicht. p
ist der Anfangsbuchstabe von "pasionIrgendwas"; nennt man das ganze
"PasionIrgendwas" meldet py2exe daß "P" nicht gefunden werden kann.
Das folgende Skript:
setup(service="pasionIrgendwas")
habe ich per "python setup.py py2exe" gestartet. Früher(TM) sahen ähnliche
Skripten so aus:
setup(name="shutdownat",
scripts=["shutdownat.py"]
)
und wurde per "python setup.py py2exe --service ShutdownAtService"
gestartet, aber das mag py2exe nun gar nicht mehr.