def writetable(self, pathout, tgens, totocc):
etoiles = totocc.keys()
def writetable(self, pathout, tgens, totocc):
etoiles = totocc.keys()
with open(pathout, 'w') as f :
line = '\t'.join([u'tgens'] + etoiles) + '\n'
f.write(line.encode(self.encoding))
with open(pathout, 'w') as f :
line = '\t'.join([u'tgens'] + etoiles) + '\n'
f.write(line.encode(self.encoding))
txt += '%s = %s\n' % (option, `parametres[i][option]`)
if outfile is None :
outfile = self.configfile
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'))