Example #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])
Example #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")
Example #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")
Example #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)
Example #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)
Example #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)
Example #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)