You are not logged in.

#1 2006-07-14 21:09:07

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Python equivalent of Java 'setchar'

so a user can enter something from standard in and echo back *'s or nothing at all instead of printing to the screen their actuall input. Like entering your password when you login.

Offline

#2 2006-07-15 04:26:12

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: Python equivalent of Java 'setchar'

Will the getpass module work for you?

>>> import getpass
>>> getpass.getpass()
Password:
'Secr3t'
>>> getpass.getpass("Enter your password : ")
Enter your password :
'Secr3t'
>>>    

Offline

#3 2006-07-15 13:37:33

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Python equivalent of Java 'setchar'

Yes. Exactly what I was looking for, thanks!

Offline

Board footer

Powered by FluxBB