...
[iramuteq] / functions.py
index 417e917..e93f34e 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))
@@ -252,8 +253,8 @@ class DoConf :
                     txt += '%s = %s\n' % (option, `parametres[i][option]`)
         if outfile is None :
             outfile = self.configfile
-        with codecs.open(outfile, 'w', 'utf8') as f :
-            f.write(txt)
+        with open(outfile, 'w') as f :
+            f.write(txt.encode('utf8'))
             #self.conf.write(f)
 
     def totext(self, parametres) :