bugfix.
[minwii.git] / src / app / event_pprinters.py
1 # -*- coding: utf-8 -*-
2 """
3 formatage des événements
4
5 $Id$
6 $URL$
7 """
8
9 from events import eventNames
10 import sys
11 self = sys.modules[__name__]
12
13 def log_COLDOWN(e) :
14 tone = e.column.tone
15 return '%s (%s)' % (tone.midi, tone.nom)
16
17 def log_COLSTATECHANGE(e) :
18 return u'%5s %s' % (e.state, e.syllabus)
19
20 def log_default(e) :
21 return ''
22 return str(e)
23
24 pprinters = {}
25 for type, name in eventNames.items() :
26 f = getattr(self, 'log_%s' % name, log_default)
27 pprinters[type] = f
28
29 __all__ = ('pprinters')