t
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
a0-c0 h1-j1 c4-g4 a6-a5 j5-j7
|
a0-c0 h1-j1 c4-g4 a5-a6 j5-j7
|
||||||
|
a1-c1 h1-j1 c4-g4 a5-a6 j5-j7
|
||||||
|
|||||||
26
main1.py
26
main1.py
@@ -1,26 +0,0 @@
|
|||||||
import blessed
|
|
||||||
import time
|
|
||||||
import sys
|
|
||||||
|
|
||||||
def main():
|
|
||||||
term = blessed.Terminal()
|
|
||||||
|
|
||||||
print(term.home + term.clear + term.move_y(term.height))
|
|
||||||
|
|
||||||
dt = 0
|
|
||||||
|
|
||||||
with term.cbreak(), term.hidden_cursor(), term.fullscreen():
|
|
||||||
while True:
|
|
||||||
t = []
|
|
||||||
while len(t) != 2:
|
|
||||||
inp = term.inkey(timeout=2)
|
|
||||||
if (ord(inp) >= 97 and ord(inp) <= 122) or (ord(inp) >= 65 and ord(inp) <= 90):
|
|
||||||
t.append(inp)
|
|
||||||
#inp = input("give input\n")
|
|
||||||
|
|
||||||
print(term.move_down(2) + 'You pressed ' + term.bold(repr(inp)))
|
|
||||||
print(term.home + term.clear + term.move_y(term.height))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
Reference in New Issue
Block a user