Files
Upsilon/apps/calculation/test.py
2020-01-04 20:49:54 +01:00

12 lines
274 B
Python

import sys, tty
def command_line():
tty.setraw(sys.stdin)
while True:
char = sys.stdin.read(1)
if ord(char) == 3: # CTRL-C
break;
print(ord(char))
sys.stdout.write(u"\u001b[1000D") # Move all the way left
command_line();