|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hello,
I want to get a password with my program in the command line. Is there a function to get a password without show it in the shell like , for example, input_passwd() ? thanks |
|
#2
|
||||
|
||||
|
Yeah there is, what you're looking for would be named 'getpass' i.e.
Code:
>>> import getpass >>> passwd = getpass.getpass() ... >>> You can use this just like raw_input() but it shouldn't echo what the user types... Mark. |
|
#3
|
|||
|
|||
|
Thank you, it works more securely now
Bye ![]() |
|
#4
|
||||
|
||||
|
No problem..
![]() Mark |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > [input] password input for the shell |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|