non-blocking getkey?
Ulli Horlacher
framstag at rus.uni-stuttgart.de
Wed Nov 18 05:39:52 EST 2015
Christian Gollwitzer <auriocus at gmx.de> wrote:
> > How can I implement such a get_paste() function?
> > I need a non-blocking getkey() function.
> > It must work on Windows and Linux.
>
> Non-blocking I/O from the commandline is OS specific. There are
> different solutions, and it's usually hacky (stty on Linux, Console API
> on Windows)
A "if windows (...) else linux (...)" solution is ok, I have such
distinction already at several places in my code.
Do you have example code for non-blocking I/O?
> Why do you not use a proper GUI toolkit to do this?
it is too complicated to rewrite my application from CLI to GUI.
But... is there a windows program with which one can select files and the
result is written to STDOUT?
Then I could use pipe open in my Python program.
> The standard terminal on Windows is very ugly, can't resize the width,
> and pasting works only if you right-click -> paste.
You can also use drag&drop. This is ok for my users.
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlacher at 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/
More information about the Python-list
mailing list