I need something like raw_input
, but without displaying the text you are typing.
Also I tried getpass
, but it still displays what I just typed.
Type text without displaying text
getpass
work very well either in command prompt or in python script.
import getpass
x = getpass.getpass("Input something: ")
print x
getpass()
doesn't work in IDLE. Try it in command prompt or on the terminal.
I need something that can do it within the script. So if getpass doesn't work in the IDLE, then I need something else –
Credo
Why exactly is this necessary to take an input in the script, but not display it?
getpass()
works very well in every application I can think of, so what exactly are you using this for? –
Metzgar © 2022 - 2024 — McMap. All rights reserved.
ncurses
. – Stater