NameError: name 'msvcrt' is not defined
MRAB
python at mrabarnett.plus.com
Thu Sep 26 23:05:13 EDT 2019
On 2019-09-27 03:14, Hongyi Zhao wrote:
> Hi,
>
> I use python on Debian, when running some python codes, I meet the
> following error:
>
> -----------
> input_username.py", line 18, in read_input
> if msvcrt.kbhit():
> NameError: name 'msvcrt' is not defined
> ------------
>
>
> How to solve this issue?
>
That code detects whether a key is being pressed on the Windows
operating system. You need to find the equivalent for Linux.
More information about the Python-list
mailing list