/head: changeset 106

Updated and enhanced the TTY display to use thread names as well.
This commit is contained in:
jgoerzen 2002-07-12 01:48:45 +01:00
parent 188497d972
commit acc436beb1
2 changed files with 6 additions and 3 deletions

View File

@ -26,8 +26,8 @@ from threading import *
if '-d' in sys.argv:
imaplib.Debug = 5
#ui = offlineimap.ui.TTY.TTYUI()
ui = offlineimap.ui.Tk.TkUI()
ui = offlineimap.ui.TTY.TTYUI()
#ui = offlineimap.ui.Tk.TkUI()
ui.init_banner()
config = ConfigParser()

View File

@ -27,7 +27,10 @@ class TTYUI(UIBase):
self.iswaiting = 0
def _msg(s, msg):
print msg
if currentThread().getName() == 'MainThread':
print msg
else:
print "%-30s %s" % (currentThread().getName(), msg)
sys.stdout.flush()
def getpass(s, accountname, config):