cli.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Tuxemon-Server 作者: Tuxemon 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号