Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to import termios package

I am using Python 3.7 and I need to import termios to mask a password input. But I am unable to find it on https://pypi.org/

import sys, tty, termios

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import sys, tty, termios
  File "C:\Python37\lib\tty.py", line 5, in <module>
    from termios import *
ModuleNotFoundError: No module named 'termios'
like image 729
saiki68 Avatar asked Aug 28 '18 16:08

saiki68


1 Answers

https://docs.python.org/3/library/tty.html says:

Because it requires the termios module, it will work only on Unix.

i.e. there is no termios for Windows.

like image 147
Adrian W Avatar answered Oct 16 '22 11:10

Adrian W