On commence à imprimer des résultats, bruts de décoffrage.
authorpin <pin@fe552daf-6dbe-4428-90eb-1537e0879342>
Fri, 23 Jul 2010 13:27:54 +0000 (13:27 +0000)
committerpin <pin@fe552daf-6dbe-4428-90eb-1537e0879342>
Fri, 23 Jul 2010 13:27:54 +0000 (13:27 +0000)
git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@288 fe552daf-6dbe-4428-90eb-1537e0879342

src/minwii/loganalyse.py
src/minwii/logapp.py

index 952c3a7..e33dfcf 100755 (executable)
@@ -71,7 +71,7 @@ class LogFileAnalyser(LogFileReader) :
             meth = getattr(self, name)
             results[name] = meth()
         
-        pprint(results)
+        return results
     
     def playingDuration(self) :
         """ retourne la durée écoulée entre le premier et de dernier message
@@ -174,7 +174,7 @@ def main() :
 
 
     lfa = LogFileAnalyser(args[0])
-    lfa.analyse()
+    pprint(lfa.analyse())
 
 if __name__ == "__main__" :
     from os.path import realpath, sep
index b48140c..4c680ba 100755 (executable)
@@ -11,6 +11,8 @@ import tkFileDialog
 from glob import glob
 from os.path import join as pjoin
 from os.path import basename
+from loganalyse import LogFileAnalyser
+from pprint import pprint
 
 class Application(Frame) :
     def __init__(self, master=None) :
@@ -68,6 +70,9 @@ class Application(Frame) :
         filepath = self.logFiles[index]
         filename = basename(filepath)
         self.identFrame.setFileName(filename)
+        rf = ResultsFrame(self.dataFrame, filepath)
+        rf.layResults()
+        rf.grid()
 
 
 class Navbar(Frame) :
@@ -154,7 +159,19 @@ class Identification(Frame) :
         
         self.commentsText = Text(self, width=40, height=4, undo=True, wrap=WORD)
         self.commentsText.grid(row=2, column=1, sticky=W)
+
+class ResultsFrame(Frame) :
+    def __init__(self, master, logFilePath) :
+        Frame.__init__(self, master)
+        self.logFilePath = logFilePath
     
+    def layResults(self) :
+        lfa = LogFileAnalyser(self.logFilePath)
+        results = lfa.analyse()
+        pprint(results)
+        rawPrint = Label(self, text=str(results))
+        rawPrint.grid()
+        
 
 app = Application()
 app.master.title("Analyseur des sessions MINWii")