...
[iramuteq] / functions.py
index d697f16..a26731b 100644 (file)
@@ -55,6 +55,7 @@ class TGen :
     
     def writetable(self, pathout, tgens, totocc):
         etoiles = totocc.keys()
+        etoiles.sort()
         with open(pathout, 'w') as f :
             line = '\t'.join([u'tgens'] + etoiles) + '\n'
             f.write(line.encode(self.encoding))
@@ -66,7 +67,7 @@ class TGen :
             while totname + `i` in tgens :
                 i += 1
             totname = totname + `i`
-            line = '\t'.join([totname] + [`totocc[et]` for et in etoiles])
+            line = '\t'.join([totname] + [`totocc[et]` for et in etoiles]) + '\n'
             f.write(line.encode(self.encoding))
 
 class History :
@@ -674,6 +675,11 @@ def progressbar(self, maxi) :
         parent = self.parent
     else :
         parent = self
+    try :
+        print '###horrible hack progressbar'
+        maxi = int(maxi)
+    except :
+        maxi = 1
     return wx.ProgressDialog("Traitements",
                              "Veuillez patienter...",
                              maximum=maxi,