By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,495 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

Python password display

P: n/a
Hello,

I am currently writing some python code which requires the use of a
password. Currently I am using the raw_input function to take the users
input in and use it. One problem with that is the password is displayed
in clear text on the console of the server. I would like to work on a
way around that. Is there any built in method to do that or any
how-to's around the Internet / Advice that I could research?

Regards,

Johhny.

Jul 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Thu, 06 Jul 2006 06:39:38 -0700, Johhny wrote:
Hello,

I am currently writing some python code which requires the use of a
password. Currently I am using the raw_input function to take the users
input in and use it. One problem with that is the password is displayed
in clear text on the console of the server. I would like to work on a
way around that. Is there any built in method to do that or any
how-to's around the Internet / Advice that I could research?

Regards,

Johhny.
http://docs.python.org/lib/module-getpass.html

Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>import getpass
pw = getpass.getpass()
Password:
>>pw
'foopasss'

HTH :)
Jul 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.