def __init__(self, app):
# Initiate the parent class
cmd.Cmd.__init__(self)
# Set up the command line prompt itself
self.prompt = "Tuxemon>> "
self.intro = 'Tuxemon CLI\nType "help", "copyright", "credits" or "license" for more information.'
# Import pretty print so that shit is formatted nicely
import pprint
self.pp = pprint.PrettyPrinter(indent=4)
# Import threading to start the CLI in a separate thread
from threading import Thread
self.app = app
self.cmd_thread = Thread(target=self.cmdloop)
self.cmd_thread.daemon = True
self.cmd_thread.start()
评论列表
文章目录