Re: [Python-Dev] Daemon process context as a ‘with ’ context manager

2009-03-16 Thread Ben Finney
Ben Finney writes: > James Pye writes: > > > with daemonized(): > > run_some_subprocess() > > This use case is addressed by my up-coming PEP, currently in draft > form but submitted to the PEP editor. A reference implementation is > at http://pypi.python.org/pypi/python-daemon/>. On second b

[Python-Dev] Daemon process context as a ‘with ’ context manager (was: PEP 377 - allow __enter __() methods to skip the statement body)

2009-03-16 Thread Ben Finney
James Pye writes: > The identification of this issue came from an *experiment* attempting > to create a *single* "daemonized()" CM that would execute the with- > statement's block in a new child process and, of course, not execute > it in the parent. At first, I ran into the RuntimeError in the