Example #1
0
def getchar():
    inkey = _Getch()
    for i in xrange(sys.maxint):
        k=inkey()
        if k!='':
            break
    return k
Example #2
0
import time
from getChar import _Getch
getch = _Getch()
from controller_thread import *
import sys



#
# Main function for the computer side of the delta robot. 
#
# getch = getch._Getch()

def loop():
    """
    Keeps looping until user enters something besides a playback command.
    """

    while(1):
        try:
            message = getch()
            pass
        except KeyboardInterrupt:
            print("KeyboardInterrupt")
            endProgram()
        # print("User Input:",message)
        if message == 'q':
            endProgram()
        elif message == 'p':
            print ("PPPPPPPPPPPPPPPP")
            ct.replay = True
Example #3
0
def getchar():
    inkey = _Getch()
    for i in xrange(sys.maxint):
        k = inkey()
        if k <> '': break
    return k