Module Import alias Import alias Import alias Import alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str Str Str body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr Str attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If NameLoad body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod NameLoad AttributeLoad NameLoad attr Return TryExcept body While NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Call NameLoad NameLoad If CompareGt Call AttributeLoad NameLoad attr Str Num body If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Print Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str decorator_list decorator_list
N/A N/A sys N/A os N/A time N/A atexit signal SIGTERM Daemon N/A object N/A N/A 
    A generic daemon class.

    Usage: subclass the Daemon class and override the run() method
     __init__ N/A N/A self pidfile stdin stdout stderr N/A /dev/null /dev/null /dev/null N/A N/A N/A self stdin stdin N/A N/A self stdout stdout N/A N/A self stderr stderr N/A N/A self pidfile pidfile N/A daemonize N/A N/A self N/A N/A N/A 
        do the UNIX double-fork magic, see Stevens' "Advanced
        Programming in the UNIX Environment" for details (ISBN 0201563177)
        http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16
         N/A N/A N/A pid N/A N/A os fork N/A N/A pid 0 N/A N/A N/A N/A sys exit 0 N/A N/A N/A OSError N/A e N/A N/A N/A N/A N/A sys stderr write N/A fork #1 failed: %d (%s)
 N/A N/A e errno N/A e strerror N/A N/A N/A sys exit 1 N/A N/A N/A os chdir / N/A N/A N/A os setsid N/A N/A N/A os umask 0 N/A N/A N/A pid N/A N/A os fork N/A N/A pid 0 N/A N/A N/A N/A sys exit 0 N/A N/A N/A OSError N/A e N/A N/A N/A N/A N/A sys stderr write N/A fork #2 failed: %d (%s)
 N/A N/A e errno N/A e strerror N/A N/A N/A sys exit 1 N/A N/A N/A N/A sys stdout flush N/A N/A N/A N/A sys stderr flush N/A si N/A file N/A self stdin r N/A so N/A file N/A self stdout a+ N/A se N/A file N/A self stderr a+ 0 N/A N/A N/A os dup2 N/A N/A si fileno N/A N/A N/A sys stdin fileno N/A N/A N/A os dup2 N/A N/A so fileno N/A N/A N/A sys stdout fileno N/A N/A N/A os dup2 N/A N/A se fileno N/A N/A N/A sys stderr fileno N/A N/A N/A atexit register N/A self delpid N/A pid N/A str N/A N/A os getpid N/A N/A N/A N/A file N/A self pidfile w+ write N/A %s
 pid N/A delpid N/A N/A self N/A N/A N/A N/A N/A os remove N/A self pidfile N/A start N/A N/A self N/A N/A N/A 
        Start the daemon
         N/A N/A N/A pf N/A file N/A self pidfile r N/A pid N/A int N/A N/A N/A N/A pf read strip N/A N/A N/A pf close N/A N/A N/A IOError N/A N/A pid None N/A pid N/A N/A message pidfile %s already exist. Daemon already running?
 N/A N/A N/A N/A sys stderr write N/A message N/A self pidfile N/A N/A N/A sys exit 1 N/A N/A N/A self daemonize N/A N/A N/A self run N/A stop N/A N/A self N/A N/A N/A 
        Stop the daemon
         N/A N/A N/A pf N/A file N/A self pidfile r N/A pid N/A int N/A N/A N/A N/A pf read strip N/A N/A N/A pf close N/A N/A N/A IOError N/A N/A pid None N/A N/A pid N/A N/A message pidfile %s does not exist. Daemon not running?
 N/A N/A N/A N/A sys stderr write N/A message N/A self pidfile N/A N/A N/A N/A True N/A N/A N/A N/A os kill pid SIGTERM N/A N/A N/A time sleep 0.1 N/A N/A N/A OSError N/A err N/A N/A err N/A str err N/A N/A N/A N/A err find No such process 0 N/A N/A N/A N/A N/A os path exists N/A self pidfile N/A N/A N/A N/A os remove N/A self pidfile N/A N/A N/A str err N/A N/A N/A sys exit 1 N/A restart N/A N/A self N/A N/A N/A 
        Restart the daemon
         N/A N/A N/A self stop N/A N/A N/A self start N/A run N/A N/A self N/A N/A N/A 
        You should override this method when you subclass Daemon. It will be called after the process has been
        daemonized by start() or restart().
         N/A N/A