and list the host name when prompting for the password.
if __debug__ and __name__ == '__main__':
+ host = ''
+ import sys
+ if sys.argv[1:]:
+ host = sys.argv[1]
+
import getpass
USER = getpass.getuser()
- PASSWD = getpass.getpass()
+ PASSWD = getpass.getpass(
+ "IMAP password for %s: " % (host or "localhost"))
test_seq1 = (
('login', (USER, PASSWD)),
return dat
Debug = 4
- M = IMAP4()
+ M = IMAP4(host)
print 'PROTOCOL_VERSION = %s' % M.PROTOCOL_VERSION
for cmd,args in test_seq1: