Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19556 > unrolled thread
| Started by | Chris Rebert <clp2@rebertia.com> |
|---|---|
| First post | 2012-01-28 12:05 -0800 |
| Last post | 2012-01-28 12:05 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Questions regarding the daemon module. Chris Rebert <clp2@rebertia.com> - 2012-01-28 12:05 -0800
| From | Chris Rebert <clp2@rebertia.com> |
|---|---|
| Date | 2012-01-28 12:05 -0800 |
| Subject | Re: Questions regarding the daemon module. |
| Message-ID | <mailman.5182.1327781128.27778.python-list@python.org> |
On Sat, Jan 28, 2012 at 5:54 AM, David Lambert <dave@lambsys.com> wrote: > I was looking for a simple way to daemonize a Python process, and found: > > http://www.python.org/dev/peps/pep-3143/ > > I used easy_install to add this package (I thought), but when I attempted to > use the example in the above link, I got the error: > > > AttributeError: 'module' object has no attribute 'DaemonContext' > > To my surprise when looking at the module that was installed, I found > something completely different to what was in the documentation: > >>>> dir(daemon) > ['__builtins__', '__doc__', '__file__', '__name__', '__package__', > 'basic_daemonize', 'checkPID', 'daemonize', 'errno', 'os', 'sys', > 'writePID'] >>>> >>>> print daemon.__doc__ > None >>>> >>>> print daemon.daemonize.__doc__ > None >>>> > > > Further experimentation with this module yielded a working daemon, but I am > concerned regarding its parentage and lack of documentation. Could someone > explain these discrepancies? You seem to have installed the "daemon" package: http://pypi.python.org/pypi/daemon/ If you read the PEP more closely, you'll see that the PEP 3143 reference implementation is instead the "python-daemon" package: http://pypi.python.org/pypi/python-daemon/ Both packages provide modules named "daemon", partially hence your confusion. Cheers, Chris
Back to top | Article view | comp.lang.python
csiph-web