~ubuntu-branches/ubuntu/saucy/coherence/saucy

« back to all changes in this revision

Viewing changes to coherence/extern/louie/signal.py

  • Committer: Bazaar Package Importer
  • Author(s): Charlie Smotherman
  • Date: 2010-01-02 10:57:15 UTC
  • mfrom: (1.1.7 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100102105715-sghzl2nw4lr5b1ob
Tags: 0.6.6.2-1
*  New  upstream release, summary of changes:
    - adding all necessary files to MANIFEST.in, to compensate for the
      gone 'auto-include-all-files-under-version-control' setuptools
      feature.
    - rearranging genre and genres attribute in DIDLLite - thx Caleb  
    - fix face_path typo, fixes #275.   

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""Signal class.
2
 
 
3
 
This class is provided as a way to consistently define and document
4
 
signal types.  Signal classes also have a useful string
5
 
representation.
6
 
 
7
 
Louie does not require you to use a subclass of Signal for signals.
8
 
"""
9
 
 
10
 
 
11
 
class _SIGNAL(type):
12
 
    """Base metaclass for signal classes."""
13
 
 
14
 
    def __str__(cls):
15
 
        return '<Signal: %s>' % (cls.__name__, )
16
 
 
17
 
 
18
 
class Signal(object):
19
 
 
20
 
    __metaclass__ = _SIGNAL
21
 
 
22
 
 
23
 
class All(Signal):
24
 
    """Used to represent 'all signals'.
25
 
 
26
 
    The All class can be used with connect, disconnect, send, or
27
 
    sendExact to denote that the signal should react to all signals,
28
 
    not just a particular signal.
29
 
    """
30