17 r# Read message number #
21 username
= raw_input("Username: ")
22 ms
= SecureInbox
.SecureInbox(username
, getpass
.getpass())
26 line
= raw_input(">> ")
29 if len(line
.strip()) == 0:
35 print "Fetching messages..."
36 msgs
= ms
.get_messages()
39 print i
, m
["sender"], m
["subject"]
48 print "Bad message: %s" % (msg
,)
49 print "Are you sure it is listed with 'l'?"
50 print "Message count: %s" % (len(msgs
),)
53 print "From: %s" % (msg
["sender"],)
54 print "Subject: %s" % (msg
["subject"],)
57 print cotp
.decode(msg
["body"])
59 print "Exception when decoding", sys
.exc_info()
61 print "Unknown command, type h for help"
63 if __name__
== "__main__":