Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19547 > unrolled thread
| Started by | David Lambert <dave@lambsys.com> |
|---|---|
| First post | 2012-01-28 07:54 -0600 |
| Last post | 2012-01-29 08:26 +1100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
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
| From | David Lambert <dave@lambsys.com> |
|---|---|
| Date | 2012-01-28 07:54 -0600 |
| Subject | Questions 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]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2012-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