X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=functions.py;h=a26731b9405ee12015ab8bfd75d8c0e989c69818;hp=884e62f1fbfa933eb8f57b1799a23a1d86274253;hb=4dc1de2e438378f357bcbb2fd8cf0075e0bdcd55;hpb=6523e3596df7ec9b7b94b875593953d4b34b6117 diff --git a/functions.py b/functions.py index 884e62f..a26731b 100644 --- a/functions.py +++ b/functions.py @@ -51,10 +51,11 @@ class TGen : if path is None : path = self.path with open(path, 'w') as f : - f.write('\n'.join(['\t'.join([val] + self.tgen[val]) for val in self.tgen])) + f.write('\n'.join(['\t'.join([val] + self.tgen[val]) for val in self.tgen]).encode(self.encoding)) 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,