Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install undead

How to install undead

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install undead
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.2.2 Available View build log
 
License
MIT
Imports
Lastest release
version 0.2.2 on Jan 9th, 2014

Dead Easy POSIX Daemons for Python!


System Message: ERROR/3 (<string>, line 8)

Unknown directive type "code".

.. code:: python

    #!/usr/bin/python
    import undead

    @undead
    def my_daemon_process():
        """ This function will be daemonized. """
        from time import sleep
        while True:
            sleep(10)


Installation

pip install undead

Settings

undead.name

Name of the logger and process.

Default: __name__ of decorated callable

undead.pidfile

Path to pidfile.

Default: ~/.{undead.name}/{undead.name}.pid

undead.log_level

Log level.

Default: "WARNING"

undead.process_name

The name of the process (that shows up in ps etc.)

Default: None (No manipulation of process name)

Example

System Message: ERROR/3 (<string>, line 54)

Unknown directive type "code".

.. code:: python

    import undead

    undead.name = "my-first-daemon"
    undead.process_name = "leDeamon"

    @undead
    def my_daemon_process():
        """ This function will be daemonized. """
        # ...

Logging within the decorated handler

Just add log to your decorated signature, and the logger will be passed down. Log away captain!

System Message: ERROR/3 (<string>, line 71)

Unknown directive type "code".

.. code:: python

    import undead

    @undead
    def i_am_undead(log):
        log.warning("I'm warning you!")
        log.info("Soap, 2 for $1.99")

The logfile will be created in ~/.i_am_undead

License

MIT

Subscribe to package updates

Last updated Jan 9th, 2014

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.