OS specific command in Python

Avell Diroll avelldiroll at yahoo.fr
Wed Jun 21 21:52:57 CEST 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 

By the way this is better explained in the official python documentation.

More information about the Python-list mailing list