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


Groups > comp.lang.python > #19547 > unrolled thread

Questions regarding the daemon module.

Started byDavid Lambert <dave@lambsys.com>
First post2012-01-28 07:54 -0600
Last post2012-01-29 08:26 +1100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  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

#19547 — Questions regarding the daemon module.

FromDavid Lambert <dave@lambsys.com>
Date2012-01-28 07:54 -0600
SubjectQuestions regarding the daemon module.
Message-ID<mailman.5175.1327759344.27778.python-list@python.org>
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.

[toc] | [next] | [standalone]


#19559

FromBen Finney <ben+python@benfinney.id.au>
Date2012-01-29 08:26 +1100
Message-ID<8762fvy0vl.fsf@benfinney.id.au>
In reply to#19547
David Lambert <dave@lambsys.com> writes:

> 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'

What command did you use to install ‘python-daemon’?

-- 
 \       “The apparent lesson of the Inquisition is that insistence on |
  `\         uniformity of belief is fatal to intellectual, moral, and |
_o__)    spiritual health.” —_The Uses Of The Past_, Herbert J. Muller |
Ben Finney

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web