Hide raw_input text?
bdesth.quelquechose at free.quelquepart.fr
Wed Aug 13 17:57:14 CEST 2008
tmallen a écrit :
> I'm working on a little FTP project to get comfortable with ftplib.
> It's all terminal-based right now, and one issue I'm having is hiding
> password input text. I'd like one of two things to happen with this:
> Either don't show any characters while I'm typing (like $ su), or
> better, a '*' for every character. Is there a way to do this? I'm
> planning on building this into a GUI tool using Tkinter or wxPython,
> so methods using a secret input for those might be helpful as well ( I
> could jump straight into the GUI part).
I think this kind of things is usually done using libs like readline.
More information about the Python-list