Sep-04-2018, 08:46 AM
Hi all ! I try to import 'msvcrt'. Impossible. I am using python 3.7. On Linux.
Error:>>> import msvcrt
... import sys
...
... while True:
... ch = msvcrt.getch()
... if ch in b'\x00':
... ch = msvcrt.getch() # Second call returns the scan code
... if ch in b'\xe0':
... ch = msvcrt.getch() # Second call Function keys
... if ch == b'q':
... sys.exit()
... else:
... print(f'Key Pressed: {ch}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'msvcrt'
No module named 'msvcrt'