I am currently working on a python program that runs as a Windows service using win32service and win32serviceutil. The service works as it should and even after using py2exe, everything is fine (the service monitors the target folders and automatically creates new FTP files for the specified FTP location). However, I would like to add some command line arguments (in addition to installing, uninstalling, starting, stopping, etc.) to specify local and FTP directories. The only documentation on this is what I found: http://www.py2exe.org/old/
"Optionally, you can specify the 'cmdline-style' attribute for py2exe, with valid values ββbeing" py2exe "(default)," pywin32 ", or" custom "." py2exe "indicates a traditional command line always supported by py2exe." pywin32 "supports the same command line arguments as pywin32 support (i.e. the same arguments that are supported when starting a service from a .py file)" custom "means that your module must provide" HandleCommandLine ", a function that responds for handling the entire command line. "
Any help would be appreciated in getting directions in the right direction. Please let me know if any code is needed for clarity.
Thanks Zach
python py2exe windows-services
Zach skinner
source share