|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.DebugClients.Python3.getpass</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.DebugClients.Python3.getpass</h1> |
|
12 <p> |
|
13 Module implementing utilities to get a password and/or the current user name. |
|
14 </p><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><p> |
|
18 This module is a replacement for the one found in the Python distribution. It |
|
19 is to provide a debugger compatible variant of the a.m. functions. |
|
20 </p> |
|
21 <h3>Global Attributes</h3> |
|
22 <table> |
|
23 <tr><td>__all__</td></tr><tr><td>default_getpass</td></tr><tr><td>unix_getpass</td></tr><tr><td>win_getpass</td></tr> |
|
24 </table> |
|
25 <h3>Classes</h3> |
|
26 <table> |
|
27 <tr><td>None</td></tr> |
|
28 </table> |
|
29 <h3>Functions</h3> |
|
30 <table> |
|
31 <tr> |
|
32 <td><a href="#getpass">getpass</a></td> |
|
33 <td>Function to prompt for a password, with echo turned off.</td> |
|
34 </tr><tr> |
|
35 <td><a href="#getuser">getuser</a></td> |
|
36 <td>Function to get the username from the environment or password database.</td> |
|
37 </tr> |
|
38 </table> |
|
39 <hr /><hr /> |
|
40 <a NAME="getpass" ID="getpass"></a> |
|
41 <h2>getpass</h2> |
|
42 <b>getpass</b>(<i>prompt = 'Password: '</i>) |
|
43 <p> |
|
44 Function to prompt for a password, with echo turned off. |
|
45 </p><dl> |
|
46 <dt><i>prompt</i></dt> |
|
47 <dd> |
|
48 Prompt to be shown to the user (string) |
|
49 </dd> |
|
50 </dl><dl> |
|
51 <dt>Returns:</dt> |
|
52 <dd> |
|
53 Password entered by the user (string) |
|
54 </dd> |
|
55 </dl> |
|
56 <div align="right"><a href="#top">Up</a></div> |
|
57 <hr /><hr /> |
|
58 <a NAME="getuser" ID="getuser"></a> |
|
59 <h2>getuser</h2> |
|
60 <b>getuser</b>(<i></i>) |
|
61 <p> |
|
62 Function to get the username from the environment or password database. |
|
63 </p><p> |
|
64 First try various environment variables, then the password |
|
65 database. This works on Windows as long as USERNAME is set. |
|
66 </p><dl> |
|
67 <dt>Returns:</dt> |
|
68 <dd> |
|
69 username (string) |
|
70 </dd> |
|
71 </dl> |
|
72 <div align="right"><a href="#top">Up</a></div> |
|
73 <hr /> |
|
74 </body></html> |