<div dir="ltr">Hi Shlomo,<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 9, 2018 at 10:36 AM, Shlomo Solomon <span dir="ltr"><<a href="mailto:shlomo.solomon@gmail.com" target="_blank">shlomo.solomon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Since import msvcrt in Python is Windows specific, I adapted some code<br>
I found to provide kbhit() and getch() in Python under Linux.<br>
<br>
I'm attaching KBHIT.py which replaces msvcrt and a small program to<br>
demonstrate how to use it - KBHIT-test.py.<br>
<br>
The KBHIT.py documentation includes usage instructions and also a link<br>
to the code I borrowed and (I hope) improved.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>thanks for your contribution.</div><div><br></div><div>some comments:</div><div><br></div><div>1. What is the licence of the code? See <a href="https://www.mail-archive.com/perl6-users@perl.org/msg04541.html">https://www.mail-archive.com/perl6-users@perl.org/msg04541.html</a> .</div><div><br></div><div>2. Please use a PyPI-like distribution format, see <a href="https://github.com/ofek/hatch">https://github.com/ofek/hatch</a> or <a href="https://github.com/audreyr/cookiecutter-pypackage">https://github.com/audreyr/cookiecutter-pypackage</a> .</div><div><br></div><div>3. For more best practices, see <a href="https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ.mdwn#what-are-some-best-practices-in-programming-that-i-should-adopt">https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ.mdwn#what-are-some-best-practices-in-programming-that-i-should-adopt</a> .</div><div><br></div><div>4. -test.py should be -example.py<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font color="#888888">
<br>
--<br>
Shlomo Solomon<br>
<a href="http://the-solomons.net" rel="noreferrer" target="_blank">http://the-solomons.net</a><br>
Claws Mail 3.11.1 - KDE 4.14.30 - Dolphin 4.14.3 - LINUX Mageia 5</font></span><br>______________________________<wbr>_________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" rel="noreferrer" target="_blank">http://mailman.cs.huji.ac.il/<wbr>mailman/listinfo/linux-il</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Shlomi Fish <a href="http://www.shlomifish.org/" target="_blank">http://www.shlomifish.org/</a><br><br>You can never truly appreciate The Gilmore Girls until you've watched it in the original Klingon.<br><br>Please reply to list if it's a mailing list post - <a href="http://shlom.in/reply" target="_blank">http://shlom.in/reply</a> .<br></div></div></div></div>
</div></div>