$URL$
"""
-from logfilereader import LogFileReader
+from minwii.logfilereader import LogFileReader
from pprint import pprint
-from musicxml import musicXml2Song
+from minwii.musicxml import musicXml2Song
from statlib import stats
DEFAULT_STATS = ('geometricmean',
}
def analyse(self) :
- self.mode = mode = self.getMode()
- print 'Mode :', mode
-
results = {}
- for name in self.POSSIBLE_ANALYSES[mode] :
- meth = getattr(self, name)
- results[name] = meth()
+ try :
+ self.mode = mode = self.getMode()
+ results['playingMode'] = mode
+ for name in self.POSSIBLE_ANALYSES[mode] :
+ meth = getattr(self, name)
+ results[name] = meth()
+ except :
+ pass
- pprint(results)
+ return results
def playingDuration(self) :
""" retourne la durée écoulée entre le premier et de dernier message
lfa = LogFileAnalyser(args[0])
- lfa.analyse()
+ pprint(lfa.analyse())
if __name__ == "__main__" :
from os.path import realpath, sep