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))
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 :
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) :
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,