I have a python 2.7 program which runs in a console window and upload files. To specify the files, the user uses Windows drag&drop (via explorer) or copy&paste. To read it I use:
file = get_paste() def get_paste(): import msvcrt while True: c = msvcrt.getch() if c == '\t': return '' if c == '\003' or c == '\004': return None if not (c == '\n' or c == '\r'): break paste = c while msvcrt.kbhit(): c = msvcrt.getch() if c == '\n' or c == '\r': break paste += c if match(r'\s',paste): paste = subst('^"(.+)"$',r'\1',paste) return paste The problem is that get_paste() contains only ASCII. All non-ASCII characters of the file name are lost. Is there an other methode of reading the input, with ALL characters, without manually hitting [ENTER]? -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de Universitaet Stuttgart Tel: ++49-711-68565868 Allmandring 30a Fax: ++49-711-682357 70550 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/ REF:<20151215081915.gb29...@rus.uni-stuttgart.de> _______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32