Documentation/Source/eric5.DebugClients.Python.getpass.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 409
0ea528e80202
equal deleted inserted replaced
57:81326a94fdca 58:37f0444c3479
20 </style> 20 </style>
21 </head> 21 </head>
22 <body><a NAME="top" ID="top"></a> 22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.DebugClients.Python.getpass</h1> 23 <h1>eric5.DebugClients.Python.getpass</h1>
24 <p> 24 <p>
25 &#77;&#111;&#100;&#117;&#108;&#101; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#117;&#116;&#105;&#108;&#105;&#116;&#105;&#101;&#115; &#116;&#111; &#103;&#101;&#116; &#97; &#112;&#97;&#115;&#115;w&#111;&#114;&#100; &#97;&#110;&#100;/&#111;&#114; &#116;&#104;&#101; &#99;&#117;&#114;&#114;&#101;&#110;&#116; &#117;&#115;&#101;&#114; &#110;&#97;&#109;&#101;. 25 Module implementing utilities to get a password and/or the current user name.
26 </p><p> 26 </p><p>
27 &#103;&#101;&#116;&#112;&#97;&#115;&#115;(&#112;&#114;&#111;&#109;&#112;&#116;) - &#112;&#114;&#111;&#109;&#112;&#116; &#102;&#111;&#114; &#97; &#112;&#97;&#115;&#115;w&#111;&#114;&#100;, w&#105;&#116;&#104; &#101;&#99;&#104;&#111; &#116;&#117;&#114;&#110;&#101;&#100; &#111;&#102;&#102; 27 getpass(prompt) - prompt for a password, with echo turned off
28 &#103;&#101;&#116;&#117;&#115;&#101;&#114;() - &#103;&#101;&#116; &#116;&#104;&#101; &#117;&#115;&#101;&#114; &#110;&#97;&#109;&#101; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#101;&#110;v&#105;&#114;&#111;&#110;&#109;&#101;&#110;&#116; &#111;&#114; &#112;&#97;&#115;&#115;w&#111;&#114;&#100; &#100;&#97;&#116;&#97;&#98;&#97;&#115;&#101; 28 getuser() - get the user name from the environment or password database
29 </p><p> 29 </p><p>
30 &#84;&#104;&#105;&#115; &#109;&#111;&#100;&#117;&#108;&#101; &#105;&#115; &#97; &#114;&#101;&#112;&#108;&#97;&#99;&#101;&#109;&#101;&#110;&#116; &#102;&#111;&#114; &#116;&#104;&#101; &#111;&#110;&#101; &#102;&#111;&#117;&#110;&#100; &#105;&#110; &#116;&#104;&#101; &#80;y&#116;&#104;&#111;&#110; &#100;&#105;&#115;&#116;&#114;&#105;&#98;&#117;&#116;&#105;&#111;&#110;. &#73;&#116; 30 This module is a replacement for the one found in the Python distribution. It
31 &#105;&#115; &#116;&#111; &#112;&#114;&#111;v&#105;&#100;&#101; &#97; &#100;&#101;&#98;&#117;&#103;&#103;&#101;&#114; &#99;&#111;&#109;&#112;&#97;&#116;&#105;&#98;&#108;&#101; v&#97;&#114;&#105;&#97;&#110;&#116; &#111;&#102; &#116;&#104;&#101; &#97;.&#109;. &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110;&#115;. 31 is to provide a debugger compatible variant of the a.m. functions.
32 </p> 32 </p>
33 <h3>Global Attributes</h3> 33 <h3>Global Attributes</h3>
34 <table> 34 <table>
35 <tr><td>__all__</td></tr><tr><td>default_getpass</td></tr><tr><td>unix_getpass</td></tr><tr><td>win_getpass</td></tr> 35 <tr><td>__all__</td></tr><tr><td>default_getpass</td></tr><tr><td>unix_getpass</td></tr><tr><td>win_getpass</td></tr>
36 </table> 36 </table>
40 </table> 40 </table>
41 <h3>Functions</h3> 41 <h3>Functions</h3>
42 <table> 42 <table>
43 <tr> 43 <tr>
44 <td><a href="#getpass">getpass</a></td> 44 <td><a href="#getpass">getpass</a></td>
45 <td>&#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#112;&#114;&#111;&#109;&#112;&#116; &#102;&#111;&#114; &#97; &#112;&#97;&#115;&#115;w&#111;&#114;&#100;, w&#105;&#116;&#104; &#101;&#99;&#104;&#111; &#116;&#117;&#114;&#110;&#101;&#100; &#111;&#102;&#102;.</td> 45 <td>Function to prompt for a password, with echo turned off.</td>
46 </tr><tr> 46 </tr><tr>
47 <td><a href="#getuser">getuser</a></td> 47 <td><a href="#getuser">getuser</a></td>
48 <td>&#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#117;&#115;&#101;&#114;&#110;&#97;&#109;&#101; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#101;&#110;v&#105;&#114;&#111;&#110;&#109;&#101;&#110;&#116; &#111;&#114; &#112;&#97;&#115;&#115;w&#111;&#114;&#100; &#100;&#97;&#116;&#97;&#98;&#97;&#115;&#101;.</td> 48 <td>Function to get the username from the environment or password database.</td>
49 </tr> 49 </tr>
50 </table> 50 </table>
51 <hr /><hr /> 51 <hr /><hr />
52 <a NAME="getpass" ID="getpass"></a> 52 <a NAME="getpass" ID="getpass"></a>
53 <h2>getpass</h2> 53 <h2>getpass</h2>
54 <b>getpass</b>(<i>prompt='Password: '</i>) 54 <b>getpass</b>(<i>prompt='Password: '</i>)
55 <p> 55 <p>
56 &#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#112;&#114;&#111;&#109;&#112;&#116; &#102;&#111;&#114; &#97; &#112;&#97;&#115;&#115;w&#111;&#114;&#100;, w&#105;&#116;&#104; &#101;&#99;&#104;&#111; &#116;&#117;&#114;&#110;&#101;&#100; &#111;&#102;&#102;. 56 Function to prompt for a password, with echo turned off.
57 </p><dl> 57 </p><dl>
58 <dt><i>prompt</i></dt> 58 <dt><i>prompt</i></dt>
59 <dd> 59 <dd>
60 &#80;&#114;&#111;&#109;&#112;&#116; &#116;&#111; &#98;&#101; &#115;&#104;&#111;w&#110; &#116;&#111; &#116;&#104;&#101; &#117;&#115;&#101;&#114; (&#115;&#116;&#114;&#105;&#110;&#103;) 60 Prompt to be shown to the user (string)
61 </dd> 61 </dd>
62 </dl><dl> 62 </dl><dl>
63 <dt>Returns:</dt> 63 <dt>Returns:</dt>
64 <dd> 64 <dd>
65 &#80;&#97;&#115;&#115;w&#111;&#114;&#100; &#101;&#110;&#116;&#101;&#114;&#101;&#100; &#98;y &#116;&#104;&#101; &#117;&#115;&#101;&#114; (&#115;&#116;&#114;&#105;&#110;&#103;) 65 Password entered by the user (string)
66 </dd> 66 </dd>
67 </dl> 67 </dl>
68 <div align="right"><a href="#top">Up</a></div> 68 <div align="right"><a href="#top">Up</a></div>
69 <hr /><hr /> 69 <hr /><hr />
70 <a NAME="getuser" ID="getuser"></a> 70 <a NAME="getuser" ID="getuser"></a>
71 <h2>getuser</h2> 71 <h2>getuser</h2>
72 <b>getuser</b>(<i></i>) 72 <b>getuser</b>(<i></i>)
73 <p> 73 <p>
74 &#70;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#117;&#115;&#101;&#114;&#110;&#97;&#109;&#101; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#101;&#110;v&#105;&#114;&#111;&#110;&#109;&#101;&#110;&#116; &#111;&#114; &#112;&#97;&#115;&#115;w&#111;&#114;&#100; &#100;&#97;&#116;&#97;&#98;&#97;&#115;&#101;. 74 Function to get the username from the environment or password database.
75 </p><p> 75 </p><p>
76 &#70;&#105;&#114;&#115;&#116; &#116;&#114;y v&#97;&#114;&#105;&#111;&#117;&#115; &#101;&#110;v&#105;&#114;&#111;&#110;&#109;&#101;&#110;&#116; v&#97;&#114;&#105;&#97;&#98;&#108;&#101;&#115;, &#116;&#104;&#101;&#110; &#116;&#104;&#101; &#112;&#97;&#115;&#115;w&#111;&#114;&#100; 76 First try various environment variables, then the password
77 &#100;&#97;&#116;&#97;&#98;&#97;&#115;&#101;. &#84;&#104;&#105;&#115; w&#111;&#114;&#107;&#115; &#111;&#110; &#87;&#105;&#110;&#100;&#111;w&#115; &#97;&#115; &#108;&#111;&#110;&#103; &#97;&#115; &#85;&#83;&#69;&#82;&#78;&#65;&#77;&#69; &#105;&#115; &#115;&#101;&#116;. 77 database. This works on Windows as long as USERNAME is set.
78 </p><dl> 78 </p><dl>
79 <dt>Returns:</dt> 79 <dt>Returns:</dt>
80 <dd> 80 <dd>
81 &#117;&#115;&#101;&#114;&#110;&#97;&#109;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;) 81 username (string)
82 </dd> 82 </dd>
83 </dl> 83 </dl>
84 <div align="right"><a href="#top">Up</a></div> 84 <div align="right"><a href="#top">Up</a></div>
85 <hr /> 85 <hr />
86 </body></html> 86 </body></html>

eric ide

mercurial