5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.DebugClients.Python.getpass</h1> |
9 <h1>eric7.DebugClients.Python.getpass</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing utilities to get a password and/or the current user name. |
11 Module implementing utilities to get a password and/or the current user name. |
13 </p> |
12 </p> |
14 <p> |
13 <p> |
15 getpass(prompt) - prompt for a password, with echo turned off |
14 getpass(prompt) - prompt for a password, with echo turned off |
17 </p> |
16 </p> |
18 <p> |
17 <p> |
19 This module is a replacement for the one found in the Python distribution. It |
18 This module is a replacement for the one found in the Python distribution. It |
20 is to provide a debugger compatible variant of the a.m. functions. |
19 is to provide a debugger compatible variant of the a.m. functions. |
21 </p> |
20 </p> |
|
21 |
22 <h3>Global Attributes</h3> |
22 <h3>Global Attributes</h3> |
|
23 <table> |
|
24 <tr><td>__all__</td></tr> |
|
25 <tr><td>default_getpass</td></tr> |
|
26 <tr><td>fallback_getpass</td></tr> |
|
27 <tr><td>pwd</td></tr> |
|
28 <tr><td>unix_getpass</td></tr> |
|
29 <tr><td>win_getpass</td></tr> |
|
30 </table> |
23 |
31 |
24 <table> |
|
25 <tr><td>__all__</td></tr><tr><td>default_getpass</td></tr><tr><td>fallback_getpass</td></tr><tr><td>pwd</td></tr><tr><td>unix_getpass</td></tr><tr><td>win_getpass</td></tr> |
|
26 </table> |
|
27 <h3>Classes</h3> |
32 <h3>Classes</h3> |
28 |
|
29 <table> |
33 <table> |
30 <tr><td>None</td></tr> |
34 <tr><td>None</td></tr> |
31 </table> |
35 </table> |
|
36 |
32 <h3>Functions</h3> |
37 <h3>Functions</h3> |
33 |
|
34 <table> |
38 <table> |
35 |
|
36 <tr> |
39 <tr> |
37 <td><a href="#getpass">getpass</a></td> |
40 <td><a href="#getpass">getpass</a></td> |
38 <td>Function to prompt for a password, with echo turned off.</td> |
41 <td>Function to prompt for a password, with echo turned off.</td> |
39 </tr> |
42 </tr> |
40 <tr> |
43 <tr> |
41 <td><a href="#getuser">getuser</a></td> |
44 <td><a href="#getuser">getuser</a></td> |
42 <td>Function to get the username from the environment or password database.</td> |
45 <td>Function to get the username from the environment or password database.</td> |
43 </tr> |
46 </tr> |
44 </table> |
47 </table> |
|
48 |
45 <hr /> |
49 <hr /> |
46 <hr /> |
50 <hr /> |
47 <a NAME="getpass" ID="getpass"></a> |
51 <a NAME="getpass" ID="getpass"></a> |
48 <h2>getpass</h2> |
52 <h2>getpass</h2> |
49 <b>getpass</b>(<i>prompt="Password: ", stream=None</i>) |
53 <b>getpass</b>(<i>prompt="Password: ", stream=None</i>) |
50 |
|
51 <p> |
54 <p> |
52 Function to prompt for a password, with echo turned off. |
55 Function to prompt for a password, with echo turned off. |
53 </p> |
56 </p> |
|
57 |
54 <dl> |
58 <dl> |
55 |
59 |
56 <dt><i>prompt</i> (str)</dt> |
60 <dt><i>prompt</i> (str)</dt> |
57 <dd> |
61 <dd> |
58 Prompt to be shown to the user |
62 Prompt to be shown to the user |
78 <hr /> |
82 <hr /> |
79 <hr /> |
83 <hr /> |
80 <a NAME="getuser" ID="getuser"></a> |
84 <a NAME="getuser" ID="getuser"></a> |
81 <h2>getuser</h2> |
85 <h2>getuser</h2> |
82 <b>getuser</b>(<i></i>) |
86 <b>getuser</b>(<i></i>) |
83 |
|
84 <p> |
87 <p> |
85 Function to get the username from the environment or password database. |
88 Function to get the username from the environment or password database. |
86 </p> |
89 </p> |
87 <p> |
90 <p> |
88 First try various environment variables, then the password |
91 First try various environment variables, then the password |
89 database. This works on Windows as long as USERNAME is set. |
92 database. This works on Windows as long as USERNAME is set. |
90 </p> |
93 </p> |
|
94 |
91 <dl> |
95 <dl> |
92 <dt>Return:</dt> |
96 <dt>Return:</dt> |
93 <dd> |
97 <dd> |
94 username |
98 username |
95 </dd> |
99 </dd> |