コード例 #1
0
 def test_method(self):
     fo = open("termtest1.txt")
     term = ANSIterm.get_ansiterm(NULL)
     for line in fo.readlines():
         t = eval(line)  # remove quotes, expand escapes
         # cheating - not the usual interface
         term.fsm.process_string(t)
     fo.close()
     print term
     return self.passed("no exceptions.")
コード例 #2
0
 def test_method(self):
     fo = open("termtest1.txt")
     term = ANSIterm.get_ansiterm(NULL)
     for line in fo.readlines():
         t = eval(line) # remove quotes, expand escapes
         # cheating - not the usual interface
         term.fsm.process_string(t)
     fo.close()
     print term
     return self.passed("no exceptions.")
コード例 #3
0
 def initialize(self):
     pm = proctools.get_procmanager()
     proc = pm.spawnpty("cat")
     self.term = ANSIterm.get_ansiterm(proc, 24, 80,
                                       terminal.ReprPrinter(sys.stdout))
     self.term.printer.set_file(self.config.logfile)
コード例 #4
0
 def initialize(self):
     pm  = proctools.get_procmanager()
     proc = pm.spawnpty("cat")
     self.term = ANSIterm.get_ansiterm(proc, 24, 80, terminal.ReprPrinter(sys.stdout))
     self.term.printer.set_file(self.config.logfile)