Change input as it is being typed in python

I am working on a project in python which includes login and I want to change the password inputted as it’s being typed a set of hashes or asterisks.
how would I do that in python?

You’d need to turn off echoing of key strokes by setting stdin to raw mode and then you could if you wanted write an asterisk when you receive a character.

first of all:
how do I turn off the echoing
can I make it happen only in certain parts of the program (login and signin)
thanks a lot!

You’d ask your terminal pretty please. If you use a unix terminal you can use python’s termios module

what is the command for that? my terminal I think is a linux one but I’m not sure

you should probably look at the module before asking how to use it

if you’d normally use that terminal app for bash/zsh or something like that then that is likely compatible with termios

I can’t find any information about the module, help?

Usually google is a good place to start looking.

can’t google anything cause I’m on a blocked Chromebook with a white list and search is blocked
I did look for it in and couldn’t find anything useful