示例#1
0
 def _change_terminal_geometry(self, rows, cols, options):
     # update the pretty printer with the new columns value
     source = '__byexample_pretty_print.update_width(%i)' % cols
     self._exec_and_wait(source,
                         options,
                         timeout=options['x']['dfl_timeout'])
     PexepctMixin._change_terminal_geometry(self, rows, cols, options)
示例#2
0
文件: cpp.py 项目: eldipa/byexample
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        PexepctMixin.__init__(
            self,
            PS1_re=r'\[cling\]\$',  # [cling]$
            any_PS_re=r'\[cling\][$!](?: \?)?')  # [cling]!
示例#3
0
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        # --nh     do not read ~/.gdbinit
        # --nx     do not read any .gdbinit
        # --quiet  do not print version number on startup
        PexepctMixin.__init__(self,
                                PS1_re = r'\(gdb\)[ ]',
                                any_PS_re = r'\(gdb\)[ ]')
示例#4
0
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        self._PS1 = r'/byexample/py/ps1> '
        self._PS2 = r'/byexample/py/ps2> '

        PexepctMixin.__init__(self,
                              PS1_re=self._PS1,
                              any_PS_re=r'/byexample/py/ps\d> ')
示例#5
0
文件: cpp.py 项目: cclauss/byexample
    def run(self, example, options):
        # the algorithm to filter the echos from the cling's output
        # (see _get_output()) doesn't work if the terminal is resized
        # so we disable this:
        options['geometry'] = self._terminal_default_geometry

        # cling's output requeries to be emulated by an ANSI Terminal
        # so we force this (see _get_output())
        options['term'] = 'ansi'

        return PexepctMixin._run(self, example, options)
示例#6
0
 def interact(self, example, options):
     PexepctMixin.interact(self)
示例#7
0
    def __init__(self, verbosity, encoding, **unused):
        PexepctMixin.__init__(self,
                                PS1_re = r'irb[^:]*:\d+:0(>|\*) ',
                                any_PS_re = r'irb[^:]*:\d+:\d+(>|\*|") ')

        self.encoding = encoding
示例#8
0
文件: gdb.py 项目: cclauss/byexample
 def run(self, example, options):
     return PexepctMixin._run(self, example, options)
示例#9
0
    def __init__(self, verbosity, encoding, **unused):
        self.encoding = encoding

        PexepctMixin.__init__(self,
                              PS1_re=r"/byexample/sh/ps1> ",
                              any_PS_re=r"/byexample/sh/ps\d+> ")
示例#10
0
    def __init__(self, verbosity, encoding, **unused):
        PexepctMixin.__init__(self,
                                PS1_re = r'node > ',
                                any_PS_re = r'(?:node > )|(?:\.\.\. )')

        self.encoding = encoding