DebugClients/Python3/getpass.py

changeset 96
9624a110667d
parent 13
1af94a91f439
child 791
9ec2ac20e54e
equal deleted inserted replaced
95:261bc03812fd 96:9624a110667d
10 getuser() - get the user name from the environment or password database 10 getuser() - get the user name from the environment or password database
11 11
12 This module is a replacement for the one found in the Python distribution. It 12 This module is a replacement for the one found in the Python distribution. It
13 is to provide a debugger compatible variant of the a.m. functions. 13 is to provide a debugger compatible variant of the a.m. functions.
14 """ 14 """
15
16 import sys
17 15
18 __all__ = ["getpass", "getuser"] 16 __all__ = ["getpass", "getuser"]
19 17
20 def getuser(): 18 def getuser():
21 """ 19 """
44 Function to prompt for a password, with echo turned off. 42 Function to prompt for a password, with echo turned off.
45 43
46 @param prompt Prompt to be shown to the user (string) 44 @param prompt Prompt to be shown to the user (string)
47 @return Password entered by the user (string) 45 @return Password entered by the user (string)
48 """ 46 """
49 return raw_input(prompt, 0) 47 return input(prompt, False)
50 48
51 unix_getpass = getpass 49 unix_getpass = getpass
52 win_getpass = getpass 50 win_getpass = getpass
53 default_getpass = getpass 51 default_getpass = getpass

eric ide

mercurial