Re: Python - getch() and kbhit()

2018-01-10 Thread Shlomo Solomon
Hi Steve, It seems something was wrong with your attachment - all I see is: ./netneut_right.svg In reply to what you wrote, I was not looking for speed, efficiency or a way to eliminate a bottleneck, but to get as close to possible to a "drop in solution" to reproduce kbhit() and getch(). Why?

Re: Python - getch() and kbhit()

2018-01-09 Thread Steve Litt
On Tue, 9 Jan 2018 10:36:51 +0200 Shlomo Solomon wrote: > Since import msvcrt in Python is Windows specific, I adapted some code > I found to provide kbhit() and getch() in Python under Linux. > > I'm attaching KBHIT.py which replaces msvcrt and a small program to > demonstrate how to use it - K

Re: Python - getch() and kbhit()

2018-01-09 Thread Shlomi Fish
thanks for the update, Shlomo. On Tue, Jan 9, 2018 at 12:40 PM, Shlomo Solomon wrote: > Hi Shlomi, > Thanks for your feedback - my reply below. > > On Tue, 9 Jan 2018 12:21:51 +0200 > Shlomi Fish wrote: > > > Hi Shlomo, > > > > On Tue, Jan 9, 2018 at 10:36 AM, Shlomo Solomon > > wrote: > > > >

Re: Python - getch() and kbhit()

2018-01-09 Thread Shlomo Solomon
Hi Shlomi, Thanks for your feedback - my reply below. On Tue, 9 Jan 2018 12:21:51 +0200 Shlomi Fish wrote: > Hi Shlomo, > > On Tue, Jan 9, 2018 at 10:36 AM, Shlomo Solomon > wrote: > > > Since import msvcrt in Python is Windows specific, I adapted some > > code I found to provide kbhit() and

Re: Python - getch() and kbhit()

2018-01-09 Thread Shlomi Fish
Hi Shlomo, On Tue, Jan 9, 2018 at 10:36 AM, Shlomo Solomon wrote: > Since import msvcrt in Python is Windows specific, I adapted some code > I found to provide kbhit() and getch() in Python under Linux. > > I'm attaching KBHIT.py which replaces msvcrt and a small program to > demonstrate how to

Python - getch() and kbhit()

2018-01-09 Thread Shlomo Solomon
Since import msvcrt in Python is Windows specific, I adapted some code I found to provide kbhit() and getch() in Python under Linux. I'm attaching KBHIT.py which replaces msvcrt and a small program to demonstrate how to use it - KBHIT-test.py. The KBHIT.py documentation includes usage instruction