Exemplo n.º 1
0
 def setspeed(self, baud):
     fd = self._fo.fileno()
     sym = getattr(termtools, "B%s" % baud)
     [iflags, oflags, cflags, lflags, ispeed, ospeed, cc] = termtools.tcgetattr(fd)
     ispeed = ospeed = sym
     termtools.tcsetattr(fd, termtools.TCSANOW, 
         [iflags, oflags, cflags, lflags, ispeed, ospeed, cc])
Exemplo n.º 2
0
 def test_method(self):
     fd = sys.stdin.fileno()
     mode = termtools.tcgetattr(fd)
     try:
         while 1:
             print self.term
             c = termtools.get_key()
             if c == "q":
                 break
             self.term.fsm.process_string(c)
     finally:
         termtools.tcsetattr(fd, termtools.TCSANOW, mode)
     return self.passed(" finished")
Exemplo n.º 3
0
 def test_method(self):
     fd = sys.stdin.fileno()
     mode = termtools.tcgetattr(fd)
     try:
         while 1:
             print self.term
             c = termtools.get_key()
             if c == "q":
                 break
             self.term.fsm.process_string(c)
     finally:
         termtools.tcsetattr(fd, termtools.TCSANOW, mode)
     return self.passed(" finished")
Exemplo n.º 4
0
	def __call__(self):
		import termtools, UserFile
		fd = sys.stdin.fileno()
		mode = termtools.tcgetattr(fd)
		try:
			while 1:
				print self.term
				try:
					c = sys.stdin.read(1)
					self.term.write(c)
				except EOFError:
					break
		finally:
			termtools.tcsetattr(fd, termtools.TCSANOW, mode)
Exemplo n.º 5
0
 def test_method(self):
     fd = sys.stdin.fileno()
     mode = termtools.tcgetattr(fd)
     try:
         while 1:
             print self.term
             c = sys.stdin.read(1)
             try:
                 self.term.write(c)
             except EOFError:
                 termtools.tcsetattr(fd, termtools.TCSANOW, mode)
                 return self.passed("vttest finished")
     finally:
         termtools.tcsetattr(fd, termtools.TCSANOW, mode)
Exemplo n.º 6
0
 def __call__(self):
     import termtools, UserFile
     fd = sys.stdin.fileno()
     mode = termtools.tcgetattr(fd)
     try:
         while 1:
             print self.term
             try:
                 c = sys.stdin.read(1)
                 self.term.write(c)
             except EOFError:
                 break
     finally:
         termtools.tcsetattr(fd, termtools.TCSANOW, mode)
Exemplo n.º 7
0
 def test_method(self):
     fd = sys.stdin.fileno()
     mode = termtools.tcgetattr(fd)
     try:
         while 1:
             print self.term
             c = sys.stdin.read(1)
             try:
                 self.term.write(c)
             except EOFError:
                 termtools.tcsetattr(fd, termtools.TCSANOW, mode)
                 return self.passed("vttest finished")
     finally:
         termtools.tcsetattr(fd, termtools.TCSANOW, mode)