# -*- coding: cp866 -*- import sys, os s=sys.argv[1] print s #input()
# -*- coding: cp866 -*- import sys, os s=sys.argv s.remove(sys.argv[0]) print s input()
['d:\\\xd1\xe0\xe9\xf2\\\xc4\xe5\xed\xfc', '\xf0\xee\xe4\xe8\xed\xe8\\']
print s
for path in s: print path
' '.join(s)
' '.join(s)
' '.join(s).decode("cp1251").encode("cp866")
sp3не хочет' '.join(s).decode("cp1251").encode("cp866")
import locale import codecs locale.setlocale(locale.LC_ALL, '') encoding = locale.getlocale()[1] if not encoding: encoding = locale.getpreferredencoding() import sys reload(sys) sys.setdefaultencoding(encoding) sys.stdout = codecs.getwriter(encoding)(sys.stdout, errors="replace") sys.stderr = codecs.getwriter(encoding)(sys.stderr, errors="replace")