CommandLine.py 文件源码

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

项目:turtle 作者: icse-turtle 项目源码 文件源码
def __init__(self):
        cmd.Cmd.__init__(self)

        # Declaration of the variables.
        self.__strategy = DepthStrategy()
        self.clear()

        # Declaration of the variables of the shell.
        global wstream, colored_loaded
        self.__milestone = 'Almost Ninja'
        self.__version = '1.0'
        self.__main_title = 'TURTLE v' + self.__version + ' (' + self.__milestone + ')'
        self.__wstream = wstream
        self.__colored_loaded = colored_loaded
        self.__error_prefix = str(colortext(r'[ERROR] ', 'red', True))
        self.__start_time = 0
        self.__elapsed_time = 0
        self.__stats = True
        self.__default_exception_message = 'Unknown exception!'
        self.use_rawinput = True
        self.ruler = '='
        self.default_file_name = 'new.clp'
        self.prompt = str(colortext('TURTLE> ', 'green'))
        self.intro = """\

                 __
      .,-;-;-,. /'_\  """ + self.__main_title + """
    _/_/_/_|_\_\) /
  '-<_><_><_><_>=/\   An expert system shell inspired by CLIPS syntax
    `/_/====/_/-'\_\\  Running on Python """ + str(platform.python_version()) + ' ' + str(platform.architecture()[0]) + """
     ''     ''    ''
    Usage: help to see online help
           <Tab> to show commands
           <Up-arrow>, <Down-arrow> to scroll through the history
           <Ctrl-d>, quit or exit to leave

       """
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号