Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    PySignalsEx 0.1.2

    Download button

    No screenshots available
    Downloads: 109  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Nick Zalutskiy | More programs
    Other/Proprietary Li... / FREE
    June 22nd, 2011, 13:33 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    PySignalsEx description

    Signal dispatcher for Python, extracted from the Django framework

    PySignalsEx is a Python signal dispatcher, extracted from the Django framework, and extended to provide a special "capture all" signal called any_signal. This special signal is useful for instrumentation, logging, auditing, debugging, etc.

    For a version that is true to Django, without this extension, see https://github.com/theojulienne/PySignals

    Example

    PySignalsEx is originally extracted from the Django framework, therefore the best place to get documentation is from the Django Signals Documentation.

    Additionally, PySignalsEx provides a special signal called 'any_signal'. When you listen for this signal, your listener will be notified of all signals sent in your application. You listen for any_signal as you would for any other.

    from pysignalsex import Signal, receiver, any_signal

    @receiver(any_signal)
    def mylistener(sender, **kwargs):
     print "kwargs:", kwargs
     if kwargs['signal'] == mysignal:
     print "mysignal"
     if kwargs['signal'] == myothersignal:
     print "myothersignal"

    mysignal = Signal(providing_args=['myarg'])
    myothersignal = Signal()

    mysignal.send(sender='sender1', myarg='myval')
    myothersignal.send(sender='sender2')



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    signal dispatcher | Python instrumentation | Python logging | Python | signal | dispatcher

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM