Difference between revisions of "Python/UserPasswords"

From ProgrammingExamples
Jump to: navigation, search
(UserPasswords.py)
(UserPasswords.py)
Line 2: Line 2:
 
[[Python|<font size='-2'>''back to Python examples''</font>]]
 
[[Python|<font size='-2'>''back to Python examples''</font>]]
 
----
 
----
<source lang="python">
+
<source lang="python"><br>
 
import getpass
 
import getpass
  

Revision as of 09:28, 27 June 2010

UserPasswords.py

back to Python examples


<br>
import getpass
 
username = str(raw_input("Username: "))
password = getpass.getpass("Password: ") #You will see that the password won't show on your screen
 
 
print("Your username is %s and your password is %s" % (username, password))


back to Python examples