def __init__(self):
"""
Initializes the application and starts the event loop.
Note:
Before anything else, the __preliminaries() method will be called,
setting up the client factory.
"""
self.__preliminaries()
# Initiate the main loop with a splash screen as the first widget.
# Use defaultPalette defined in globals, and the Twisted reactor loop.
self.mainLoop = urwid.MainLoop(EmptyFrame("Welcome to ChatMaster 3000", self), defaultPalette, event_loop=urwid.TwistedEventLoop())
# Put the screen into 256-color mode
self.mainLoop.screen.set_terminal_properties(colors=256)
# Show the login screen
self.__transitionToFrame(LoginFrame, 1)
self.mainLoop.run()
评论列表
文章目录