Windows Service with Python 3.5 and pyinstaller
- Python 3.5.x
- Visual C++ Build Tools 2015
- PyInstaller 3.2
(env)$ python -V
Python 3.5.2
(env)$ pip freeze
PyInstaller==3.2
(env)$ pyinstaller -F --hidden-import=win32timezone WindowsService.py
(env) dist\WindowsService.exe install
Installing service TestService
Service installed
(env) dist\WindowsService.exe start
Starting service TestService
(env) dist\WindowsService.exe stop
(env) dist\WindowsService.exe remove
@guillaumevincent, hello man. thx for sharing this, it's very helpful. I have a little problem with relative path ... i mean, if i use your example:
"with open('C:\TestService.log', 'a') as f:" all works fine, but if i set something like: "with open('.\TestService.log', 'a') as f:" no TestService.log is created. I'm running w10. Thx