0

What currently can be used to distribute application as Windows service?

py2exe supports Python under 3.4 but pywin32 is deprecated. Pyinstaller creates *.exe without errors, but it works only in debug mode.

Didn't try cx_Freeze. As I understand it overrides service name that I store in my app from parsed config.ini?

And for Pyinstaller I checked all hidden imports. Only win32timezone is needed. And that part was used too

if __name__ == '__main__':
        if len(sys.argv) == 1:
            servicemanager.Initialize()
            servicemanager.PrepareToHostSingle(WinService)
            servicemanager.StartServiceCtrlDispatcher()
        else:
            win32serviceutil.HandleCommandLine(WinService)

I'd like to use Python 3.x, because of unicode.

phyatt
  • 18,472
  • 5
  • 61
  • 80
Rostislav Aleev
  • 351
  • 5
  • 19

1 Answers1

0

pywin32 on sourceforge is retired. See the migration to github pywin32-@github.

For an example see python-script-as-a-service-in-windows