Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'handler': 0.04; '__name__': 0.09; 'command-line': 0.09; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'properties,': 0.09; 'pywin32': 0.09; "'__main__':": 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; 'subject:Windows': 0.18; 'interesting.': 0.18; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.22; 'header:In- Reply-To:1': 0.22; 'installing': 0.29; 'cc:addr:python.org': 0.30; 'install,': 0.30; 'invoke': 0.30; 'tjg': 0.30; 'subject:?': 0.31; 'shows': 0.32; 'like.': 0.32; 'does': 0.32; 'app': 0.33; 'header :User-Agent:1': 0.34; 'normally': 0.34; 'executable': 0.34; 'subject:service': 0.34; 'doing': 0.36; 'something': 0.37; 'install': 0.37; 'subject:: ': 0.39; 'received:192': 0.39; 'under': 0.39; 'skip:w 30': 0.61; 'from:addr:mail': 0.64; 'show': 0.67; 'imagine': 0.71; 'service?': 0.91; 'to:none': 0.93 Date: Wed, 17 Aug 2011 13:17:22 +0100 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 CC: python-list@python.org Subject: Re: Windows service in production? References: <90342eaa-28e2-4a86-9e5c-07299de10435@g9g2000yqb.googlegroups.com> <27ced2ef-7ae8-4b40-b4eb-c9168f369598@w11g2000vbp.googlegroups.com> In-Reply-To: <27ced2ef-7ae8-4b40-b4eb-c9168f369598@w11g2000vbp.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313583453 news.xs4all.nl 23878 [2001:888:2000:d::a6]:59305 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11678 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