On Tue 2015-12-15 (11:10), Tim Roberts wrote:

> > 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.
> 
> This is hopeless.  In addition to the normal difficulties in
> string/Unicode conversions, you have the added limitations of the
> current console code page.  You simply cannot type characters in a
> Windows console that are not present in your current code page.

What is the current code page?
drag&drop of a file with a non-ASCII filename from the explorer into a
"naked" console window works:

http://fex.rus.uni-stuttgart.de/fop/dLxrxPBV/X-201512152036.png

Is there no way to catch it with Python?



> Your code is also making assumptions about the behavior of the console
> window that are not warranted.  No one promised, for example, that a
> string pasted with "paste" is going to fire kbhit() continuously until
> empty.

So far, it works :-)


> > To read it I use:
> >
> > file = get_paste()
> 
> It is unwise to use the name of a built-in type as the name of a variable.

Ooops. True.

-- 
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:<567065b3.3070...@probo.com>
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to