On Tuesday, October 25, 2016 at 11:02:47 AM UTC+1, BartC wrote: > On 25/10/2016 07:39, Steven D'Aprano wrote: > > >> I gather that non-blocking keyboard input functions aren't the easiest > >> thing > >> to implement. They seem to depend on the operating system. Still, ease of > >> use is a primary goal of Python, and the need for this feature must be > >> common. > > > > > > Not really. I think that lots of people think they need it, but once they > > write > > a little utility, they often realise that it's not that useful. > > > If you (generic you, not you specifically) are telling the user "press any > > key > > to continue", then you probably shouldn't. *Any* key may not do anything. > > E.g. > > if the user hits the Shift key. A much better interface is to specify a > > specific key, and ignore anything else... in which case, why not specify the > > Enter key? > > > > raw_input('Press the Enter key to continue... ') > > Which doesn't work on Python 3. So even here, making it easy by using > line-input, it's not so straightforward. >
Just get this http://pythonhosted.org/six/ or similar. -- https://mail.python.org/mailman/listinfo/python-list