OS specific command in Python

Avell Diroll avelldiroll at yahoo.fr
Wed Jun 21 15:52:57 EDT 2006


diffuser78 at gmail.com wrote:
> I have a question on getpass. Since I am a newbie you might find it a
> little dumb.
> 
> By using the getpass, are u trying to retrieve the username and
> password of remote mahcine or local ?
> 

the module getpass contains 2 functions, getuser() and getpass() :

getuser() returns the username of the user executing the python script 
on the machine where the script is executed.

getpass() prompts the user for a password and returns it in a string 
whitout printing it on screen (just as the text mode login on linux  or 
ssh).

By the way this is better explained in the official python documentation.
http://docs.python.org/lib/module-getpass.html



More information about the Python-list mailing list