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

Ben Finney ben+python at benfinney.id.au
Tue Mar 17 07:35:23 CET 2009


Ben Finney <ben+python at benfinney.id.au> writes:

> James Pye <lists at jwp.name> 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 <URL:http://pypi.python.org/pypi/python-daemon/>.

On second blush, it addresses a smaller use case, with the same syntax
as your example. It should still be applicable at some level.

> I'd like to know whether this meets your needs; follow-ups privately
> to me or in ‘python-ideas’ as you think appropriate.

Ditto.

-- 
 \      “Life does not cease to be funny when people die any more than |
  `\  it ceases to be serious when people laugh.” —George Bernard Shaw |
_o__)                                                                  |
Ben Finney



More information about the Python-Dev mailing list