Beispiel #1
0
def curses_setup():
    stdscr = curses.initscr()
    # Don't echo keys to console
    curses.noecho()
    # Read in keystrokes instantly (don't wait for ENTER)
    curses.cbreak()
    # Have curses handle special keys (ex. Page Up) for us
    curses.keypad(True)
    # Attempt to hide the cursor
    curses.curs_set(False)

    return stdscr
Beispiel #2
0
def setupCurses():
    stdscr = curses.initscr()
    curses.noecho()
    curses.cbreak()
    curses.keypad(1)
    return stdscr
Beispiel #3
0
            v.setDaemon(True)
            v.start()

    if c == ord('y'):
        for i in range(3):
            y = threading.Thread(target=yep, args=(z, ))
            y.setDaemon(True)
            y.start()

    if c == ord('n'):
        for i in range(3):
            n = threading.Thread(target=nope, args=(x, ))
            n.setDaemon(True)
            n.start()
# If you can get this to work then please go ahead
#	if c == curses.KEY_UP #Increase the length of the video up to 10 seconds, key_up doesn't work
#		if i < 10
#			i+=1
#
#	if c == curses.KEY_DOWN #Decrease the length of the video down to 1 second, key_down doesn't work
#		if i > 0
#		i-=1

#End
camera.stop_preview()
curses.nocbreak()
stdscr.keypad(0)
curses.echo()
curses.keypad(False)
curses.endwin()
Beispiel #4
0
def endCurses():
    curses.nocbreak()
    curses.keypad(0)
    curses.echo()
    curses.endwin()