for ifile in range(len(files)):
namefile = files[ifile]
if os.path.isfile(namefile):
- print "%s exists, skipping." % (namefile,)
+ print (u"%s exists, skipping." % (namefile,)).encode("utf-8")
else:
f = open(namefile, "w")
f.write(contents[ifile].encode("utf-8"))
out = proc.stdout.read()
newdict = json.loads(out)
update_last_seen(newdict)
- print u"Nouvel état : %r" % newdict
+ print (u"Nouvel état : %r" % newdict).encode("utf-8")
args = sys.argv[2:]
output = ACTIONS[commande](*args)
if output:
- print output
+ print output.encode("utf-8")