Re: Daemon management

2011-12-27 Thread Fredrik Tolf

On Tue, 27 Dec 2011, Miki Tebeka wrote:

What was the term you used to search? Since 
http://pypi.python.org/pypi/ingress/0.1.1 seems to fit your description.


Not quite, though. It (AFAICT, at least) only provides the REPL part, with 
no way to construct a more program-friendly interface.


--

Fredrik Tolf

--
http://mail.python.org/mailman/listinfo/python-list


Re: Daemon management

2011-12-27 Thread Fredrik Tolf



On Wed, 28 Dec 2011, Lie Ryan wrote:

On 12/27/2011 12:43 PM, Fredrik Tolf wrote:

[...]
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/)


Thanks, but not as long as the debugger freezes the program it attaches 
to.


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.


Interesting. That does sound very similar to what I wanted, so it's kind 
of a shame that I didn't find it. If anything, it seems that PDM is a bit 
more flexible in that it can handle limited references to remote 
objects, event notifications from the server to the client, and has better 
support for handling both TCP and Unix sockets (the rconsole script, for 
instance, seems to lack support for connecting to Unix sockets), so I 
guess my time wasn't wasted.


--

Fredrik Tolf
--
http://mail.python.org/mailman/listinfo/python-list


Re: Daemon management

2011-12-27 Thread Miki Tebeka
What was the term you used to search? Since 
http://pypi.python.org/pypi/ingress/0.1.1 seems to fit your description.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Daemon management

2011-12-27 Thread Lie Ryan

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.


--
http://mail.python.org/mailman/listinfo/python-list


Daemon management

2011-12-26 Thread Fredrik Tolf

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:




Humbly,

Fredrik Tolf
--
http://mail.python.org/mailman/listinfo/python-list