Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #11678

Re: Windows service in production?

Date 2011-08-17 13:17 +0100
From Tim Golden <mail@timgolden.me.uk>
Subject Re: Windows service in production?
References <90342eaa-28e2-4a86-9e5c-07299de10435@g9g2000yqb.googlegroups.com> <mailman.44.1313481167.27778.python-list@python.org> <27ced2ef-7ae8-4b40-b4eb-c9168f369598@w11g2000vbp.googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.125.1313583453.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 16/08/2011 15:46, snorble wrote:
> Interesting. Normally I would use py2exe then do "myapp.exe -install"
> to install the app as a service. How do you handle installing the
> service? Also what does the service show under the properties, for the
> executable? "python.exe script.py" or something else?

To install, I simply invoke the Command-line handler which comes with 
the pywin32 service utils:

if __name__ == '__main__':
   win32serviceutil.HandleCommandLine (Service)

(I imagine that's what py2exe's doing for you behind the scenes).

The executable shows as pythonservice.exe. The short and long
display names can of course be whatever you like.

TJG

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Windows service in production? snorble <snorble@hotmail.com> - 2011-08-15 21:32 -0700
  Re: Windows service in production? Tim Golden <mail@timgolden.me.uk> - 2011-08-16 08:52 +0100
    Re: Windows service in production? snorble <snorble@hotmail.com> - 2011-08-16 07:46 -0700
      Re: Windows service in production? Tim Golden <mail@timgolden.me.uk> - 2011-08-17 13:17 +0100
      Re: [Python] Re: Windows service in production? Chris Gonnerman <chris@gonnerman.org> - 2011-08-18 09:30 -0500
      Re: [Python] Re: Windows service in production? Chris Gonnerman <chris@gonnerman.org> - 2011-08-18 22:45 -0500
  Re: Windows service in production? alex23 <wuwei23@gmail.com> - 2011-08-16 01:08 -0700
  Re: Windows service in production? aspineux <aspineux@gmail.com> - 2011-08-16 05:55 -0700
  Re: Windows service in production? Grummble <grrrrr@rrrrr.com> - 2011-08-18 22:24 -0400
  Re: Windows service in production? Stephen Hansen <me+list/python@ixokai.io> - 2011-08-18 22:00 -0700

csiph-web