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


Groups > comp.lang.python > #19547

Questions regarding the daemon module.

Date 2012-01-28 07:54 -0600
From David Lambert <dave@lambsys.com>
Subject Questions regarding the daemon module.
Newsgroups comp.lang.python
Message-ID <mailman.5175.1327759344.27778.python-list@python.org> (permalink)

Show all headers | View raw


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?


Best regards,

Dave.

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


Thread

Questions regarding the daemon module. David Lambert <dave@lambsys.com> - 2012-01-28 07:54 -0600
  Re: Questions regarding the daemon module. Ben Finney <ben+python@benfinney.id.au> - 2012-01-29 08:26 +1100

csiph-web