OS specific command in Python
diffuser78 at gmail.com
diffuser78 at gmail.com
Wed Jun 21 09:34:42 EDT 2006
More information about the Python-list mailing list
Wed Jun 21 09:34:42 EDT 2006
- Previous message (by thread): OS specific command in Python
- Next message (by thread): OS specific command in Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 ? Avell Diroll wrote: > stephanearnold at yahoo.fr wrote: > > When you connect (via ssh or telnet) to a remote machine, you need to > > type (manually) > > your username and your password. Programming that is never easy. > > > > This is really eased by the module getpass (std library) : > > ### > > import getpass > > login = getpass.getuser() > password = getpass.getpass() > > ### > > If the username is different from your system login this can be changed to : > > ### > > import getpass > > login = raw_input('login: ') > password = getpass.getpass() > > ### > > > Python definitely comes with batteries included !
- Previous message (by thread): OS specific command in Python
- Next message (by thread): OS specific command in Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list