[EMAIL PROTECTED] 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 !
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to