Source code for scitex_etc.wait_key
#!/usr/bin/env python3
# File: src/scitex_etc/wait_key.py
import multiprocessing
import time
import readchar
[docs]
def wait_key(p):
key = "x"
while key != "q":
key = readchar.readchar()
print(key)
print("q was pressed.")
p.terminate()
if __name__ == "__main__":
p1 = multiprocessing.Process(target=count)
p1.start()
wait_key(p1)
print("aaa")
# EOF