|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.DebugClients.Python.getpass</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.DebugClients.Python.getpass</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing utilities to get a password and/or the current user name. |
|
13 </p> |
|
14 <p> |
|
15 getpass(prompt) - prompt for a password, with echo turned off |
|
16 getuser() - get the user name from the environment or password database |
|
17 </p> |
|
18 <p> |
|
19 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. |
|
21 </p> |
|
22 <h3>Global Attributes</h3> |
|
23 |
|
24 <table> |
|
25 <tr><td>__all__</td></tr><tr><td>default_getpass</td></tr><tr><td>fallback_getpass</td></tr><tr><td>unix_getpass</td></tr><tr><td>win_getpass</td></tr> |
|
26 </table> |
|
27 <h3>Classes</h3> |
|
28 |
|
29 <table> |
|
30 <tr><td>None</td></tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 |
|
34 <table> |
|
35 |
|
36 <tr> |
|
37 <td><a href="#getpass">getpass</a></td> |
|
38 <td>Function to prompt for a password, with echo turned off.</td> |
|
39 </tr> |
|
40 <tr> |
|
41 <td><a href="#getuser">getuser</a></td> |
|
42 <td>Function to get the username from the environment or password database.</td> |
|
43 </tr> |
|
44 </table> |
|
45 <hr /> |
|
46 <hr /> |
|
47 <a NAME="getpass" ID="getpass"></a> |
|
48 <h2>getpass</h2> |
|
49 <b>getpass</b>(<i>prompt='Password: ', stream=None</i>) |
|
50 |
|
51 <p> |
|
52 Function to prompt for a password, with echo turned off. |
|
53 </p> |
|
54 <dl> |
|
55 |
|
56 <dt><i>prompt</i> (str)</dt> |
|
57 <dd> |
|
58 Prompt to be shown to the user |
|
59 </dd> |
|
60 <dt><i>stream</i> (file)</dt> |
|
61 <dd> |
|
62 input stream to read from (ignored) |
|
63 </dd> |
|
64 </dl> |
|
65 <dl> |
|
66 <dt>Return:</dt> |
|
67 <dd> |
|
68 Password entered by the user |
|
69 </dd> |
|
70 </dl> |
|
71 <dl> |
|
72 <dt>Return Type:</dt> |
|
73 <dd> |
|
74 str |
|
75 </dd> |
|
76 </dl> |
|
77 <div align="right"><a href="#top">Up</a></div> |
|
78 <hr /> |
|
79 <hr /> |
|
80 <a NAME="getuser" ID="getuser"></a> |
|
81 <h2>getuser</h2> |
|
82 <b>getuser</b>(<i></i>) |
|
83 |
|
84 <p> |
|
85 Function to get the username from the environment or password database. |
|
86 </p> |
|
87 <p> |
|
88 First try various environment variables, then the password |
|
89 database. This works on Windows as long as USERNAME is set. |
|
90 </p> |
|
91 <dl> |
|
92 <dt>Return:</dt> |
|
93 <dd> |
|
94 username |
|
95 </dd> |
|
96 </dl> |
|
97 <dl> |
|
98 <dt>Return Type:</dt> |
|
99 <dd> |
|
100 str |
|
101 </dd> |
|
102 </dl> |
|
103 <div align="right"><a href="#top">Up</a></div> |
|
104 <hr /> |
|
105 </body></html> |