Cannot Import Daemon class
Question: I am trying to run a daemon but I am not able to import the module daemon.

My imports:

    
    
    import os
    import sys
    import time
    from daemon import Daemon
    

**Traceback (most recent call last): File "parser.py", line 11, in from daemon
import Daemon ImportError: cannot import name Daemon**

I tried with python-daemon package but it didn't solve my problem. Any idea?

Thanks.


Answer: There is just no class named `Daemon`. From [PEP
3143](http://www.python.org/dev/peps/pep-3143/#example-usage), the basic usage
is:

    
    
    import daemon
    
    from spam import do_main_program
    
    with daemon.DaemonContext():
        do_main_program()
    

I guess, you should follow this guidelines.

