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


Groups > comp.lang.python > #102580

Re: Daemon strategy

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Timo Furrer <tuxtimo@gmail.com>
Newsgroups comp.lang.python
Subject Re: Daemon strategy
Date Fri, 5 Feb 2016 10:58:42 -0800
Lines 54
Message-ID <mailman.37.1454755053.2317.python-list@python.org> (permalink)
References <CAJ4+4apHhfYBw33xVsG_dFbf9iEGfiiimh0mHCq=LGo0d96yWg@mail.gmail.com> <85d1sb9eh7.fsf@benfinney.id.au>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de neZaciLrRFxkdI2+AqG6yAQvT6+1lY4Gb3Y2/b2nwexw==
Return-Path <tuxtimo@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'skip:p 60': 0.05; 'cc:addr :python-list': 0.09; 'definition,': 0.09; 'url:github': 0.09; ':-)': 0.12; '2016': 0.16; '8bit%:32': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:strategy': 0.16; 'subprocess': 0.16; 'win32process': 0.16; 'wrote:': 0.16; '&gt;': 0.18; 'windows': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'cc:no real name:2**0': 0.22; 'am,': 0.23; 'appears': 0.23; 'seems': 0.23; 'feb': 0.23; 'eager': 0.23; 'import': 0.24; 'unix': 0.24; 'header:In-Reply-To:1': 0.24; 'fri,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'correct': 0.28; 'url:mailman': 0.30; 'agreed': 0.31; "can't": 0.32; 'run': 0.33; 'url:python': 0.33; 'windows.': 0.33; 'url:listinfo': 0.34; 'that,': 0.34; 'received:google.com': 0.35; 'received:74.125.82': 0.35; 'should': 0.36; 'url:org': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; 'wrong': 0.38; 'url:mail': 0.40; 'where': 0.40; "you'll": 0.61; 'email addr:gmail.com': 0.62; 'skip:\xc2 10': 0.67; 'skip:\xe2 10': 0.70; '\xe2\x80\x93': 0.72; 'facilities': 0.72; '_o__)': 0.84; 'lacks': 0.84; 'avoided.': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U1KZRkW0iyD5kRzd8ZSTiVRuWU66i/7AkknXgCkUGek=; b=fT3zq868Nlw6vO/i8dJsNPGUEMamHh4/xyYzIrGGzvIjbwaCfOWUN2NVJDyhkmwKi6 jWMVJsX1QFAFiboUC7qlVMcxytzjkehZ3RRcWxUIeEIz/hqqbEWnfFMujoN8NQxjtIch AFVOQM3WVjIJ7a/iO1yqgEH9SSUrtdHlNHbc3firTwK7VXAnFpfZvbx0jnvDW9GpZEO5 ZXAT7TQ4X2xwH74q4MwUY+pRDYKypDP/V5wSJ2TVtrr/pl//1Tk6SwcGB4BT0yPrfBcC BlUZEDVomhSSb6JpVHyUPiih64b4n0iV72kdiuAzJnGawDxV9p8vGz1w72xY5riaPeOv +euQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=U1KZRkW0iyD5kRzd8ZSTiVRuWU66i/7AkknXgCkUGek=; b=Wr0IRSxLQKS5GzaWIr6o+mHNcbaZGj5rk1C2w7iqfkCwiw064lHAlAbRvsCPfqRc90 bIq2t3wraHcROvkACmG03idjlv8NB2LBl+UtzZMIRKP0K6svmR8E43R4JMHRu6EWhGNW vZn3nUf7DOukxQME8Xc9kguRnhwJATqP6XbpsnWf3FTiGX6+QB41lK41bOiAe4WzX4+v doGhKhced7h7Wix09bs/4cb3R8UHhEiPqu02grqyXYYjNwsZk6Q4zmuy0xoVDlAVkAsZ BO11AGAgFEWfYvaa2LiJoJTT0xNnljuIC6tc92VGLgT/bJ0kyNwIcSdamyygQTZQFiOt tbzw==
X-Gm-Message-State AG10YOTdCw6HqXMnXrkHUg23LPSrzBAAB9rvjZI6+/OOvsZoWsiLQMwVivGBACg7Jt51cppbKiKtbpRYgqeQvw==
X-Received by 10.194.5.227 with SMTP id v3mr18518236wjv.59.1454698722890; Fri, 05 Feb 2016 10:58:42 -0800 (PST)
In-Reply-To <85d1sb9eh7.fsf@benfinney.id.au>
X-Mailman-Approved-At Sat, 06 Feb 2016 05:37:33 -0500
X-Content-Filtered-By Mailman/MimeDel 2.1.21rc2
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102580

Show key headers only | View raw


As Ben already said .. either deploy to Unix systems or use
subprocess.Popen and detach the process:

from subprocess import Popenfrom win32process import DETACHED_PROCESS
Popen(["YOURPROCESS"],creationflags=DETACHED_PROCESS,shell=True)



On Fri, Feb 5, 2016 at 10:52 AM, Ben Finney <ben+python@benfinney.id.au>
wrote:

> paul.hermeneutic@gmail.com writes:
>
> > It appears that python-deamon would be exactly what I need. Alas,
> > appears not to run on Windows. If I am wrong about that, please tell
> > me.
>
> You're correct that ‘python-daemon’ uses Unix facilities to create a
> well-behaved Unix daemon process.
>
> Since MS Windows lacks those facilities, ‘python-daemon’ can't use them.
>
> > To what tools should I turn?
>
> If what you need – the support to create a Unix daemon process – is
> available only on Unix by definition, it seems you'll need to deploy to
> Unix.
>
> > I am not eager to produce a "service" on Windows unless it cannot be
> > avoided.
>
> Agreed :-)
>
> --
>  \     “Wrinkles should merely indicate where smiles have been.” —Mark |
>   `\                                    Twain, _Following the Equator_ |
> _o__)                                                                  |
> Ben Finney
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
*Timo Furrer*

https://github.com/timofurrer
tuxtimo@gmail.com

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


Thread

Re: Daemon strategy Timo Furrer <tuxtimo@gmail.com> - 2016-02-05 10:58 -0800

csiph-web