0f5691573264436352d67f147fadb0367631b441
[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)' % (e.midi, e.nom)
16
17 def log_COLSTATECHANGE(e) :
18 return u'%5s %s' % (e.state, e.syllabus)
19
20 def log_default(e) :
21 return str(e)
22
23 pprinters = {}
24 for type, name in eventNames.items() :
25 f = getattr(self, 'log_%s' % name, log_default)
26 pprinters[type] = f
27
28 __all__ = ('pprinters')