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


Groups > comp.lang.python > #18030

Re: Daemon management

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'context': 0.04; 'socket': 0.04; 'library,': 0.05; 'debugging.': 0.07; 'python': 0.08; 'alter': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'library': 0.13; 'debugger.': 0.16; 'nature,': 0.16; 'nevertheless': 0.16; 'wrote:': 0.18; 'appears': 0.19; "doesn't": 0.22; 'wrote': 0.22; 'header:In-Reply-To:1': 0.22; 'code': 0.25; "i'm": 0.26; 'remote': 0.28; 'bit': 0.28; 'problem': 0.29; 'pm,': 0.29; 'url:)': 0.29; 'anyone': 0.31; "i've": 0.31; 'skip:l 30': 0.32; 'yet': 0.32; 'header:User-Agent:1': 0.33; 'actually': 0.33; 'header:X -Complaints-To:1': 0.33; 'to:addr:python-list': 0.34; 'things': 0.34; 'surprised': 0.34; 'similar': 0.36; 'received:au': 0.36; 'interface.': 0.37; 'but': 0.37; 'run': 0.37; 'list,': 0.37; 'another': 0.37; 'received:org': 0.38; 'some': 0.38; 'couple': 0.38; 'url:org': 0.39; 'else': 0.39; "couldn't": 0.39; 'tool': 0.39; 'to:addr:python.org': 0.40; 'personal': 0.60; 'managing': 0.61; 'kind': 0.61; 'happen': 0.61; 'order': 0.62; 'dear': 0.64; 'share': 0.66; 'natural': 0.66; 'ways,': 0.67; '12:43': 0.84; 'ad- hoc': 0.84; 'commands.': 0.84; 'fredrik': 0.84; 'subject:management': 0.84; 'wheel': 0.84; 'lately,': 0.91; 'mine,': 0.91; 'received:110': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Lie Ryan <lie.1296@gmail.com>
Subject Re: Daemon management
Date Wed, 28 Dec 2011 04:23:05 +1100
References <alpine.DEB.2.02.1112270226440.4050@pc7.dolda2000.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 110-175-240-90.static.tpgi.com.au
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0
In-Reply-To <alpine.DEB.2.02.1112270226440.4050@pc7.dolda2000.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4140.1325006608.27778.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1325006608 news.xs4all.nl 6952 [2001:888:2000:d::a6]:37391
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:18030

Show key headers only | View raw


On 12/27/2011 12:43 PM, Fredrik Tolf wrote:
> Dear list,
>
> Lately, I've had a personal itch to scratch, in that I run a couple of
> Python programs as daemons, and sometimes want to inspect or alter them
> in ad-hoc ways, or other times need to do things to them that are less
> ad-hoc in nature, but nevertheless lack a natural user interface.
>
> In order to solve that problem, I wrote a small library to allow the
> daemon to simply listen to some socket and accept arbitrary, but easily
> definable, commands. It also provides a "remote REPL" to allow me to run
> arbitrary Python code interactively in the context of the daemon.
>
> I was actually a bit surprised that I couldn't find any obvious existing
> solution to the problem, so I'm writing this message in order to share
> mine, just in case anyone else would happen to have the same problem as
> I had and doesn't want to reinvent the wheel yet again:

This is possible through the use of a debugger. I've never used it, but 
I heard good thing of winpdb which has remote debugging. 
(http://winpdb.org/)

Another tool that I've never used is rconsole, part of rfoo library, 
which appears to be similar to pdm; it is also intended for the same 
kind of problem, managing long-running-processes/daemons.

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


Thread

Re: Daemon management Lie Ryan <lie.1296@gmail.com> - 2011-12-28 04:23 +1100

csiph-web