cannot open file with non-ASCII filename

eryk sun eryksun at gmail.com
Tue Dec 15 10:34:17 EST 2015


On Tue, Dec 15, 2015 at 2:26 AM, Ulli Horlacher
<framstag at rus.uni-stuttgart.de> wrote:
> Laura Creighton <lac at openend.se> wrote:
>
>> PyPy wrote its own pyreadline.
>> You can get it here. https://bitbucket.org/pypy/pyrepl
>
> As far as I can see, it has no getkey function.
> My users do not hit ENTER after drag&drop or copy&paste files.
> I need an input function with a timeout.

pyreadline looked promising for its extensive ctypes implementation of
the Windows console API [1], wrapped by high-level methods such as
peek, getchar, and getkeypress. It turns out it ignores the event
sequences you need for alt+numpad input (used when a file is dragged
into the console). You'd have to modify its console and keysyms
modules to make it work. It would be a useful enhancement, so probably
your patches would be accepted upstream.

AFAICT, pyrepl has no Windows support. Check the TODO [2]:

> + port to windows

[1]: https://github.com/pyreadline/pyreadline/blob/master/pyreadline/console/console.py
[2]: https://bitbucket.org/pypy/pyrepl/src/62f2256014af7b74b97c00827f1a7789e00dd814/TODO?at=v0.8.4



More information about the Python-list mailing list