Thank you for your helping. I could solve my probem myself
as following these steps.

1 2 3 4 5 6 7 |
import mscvrt while True : key = mscvrt.getch().decode('utf - 8 ) if key = = '1' print ( 'System is active.' ) elif key = = '0' print ( 'System is inactive.' ) |