zkusil jsem google = python wait for keypress , vic o tom nevim. Asi bys mel vytahovat klavesu pres system, az ma system nad tim kontrolu.
Příspěvky odeslané z IP adresy 2001:718:2601:258:d9f8:72f2:f1a2:9f0...–
peter
peter
raw_input("Press Enter to continue...")
input("Press Enter to continue...") """ input(prompt) is equivalent to eval(raw_input(prompt)).
import msvcrt as m
def wait():
m.getch()
import termios, fcntl, sys, os
...
c = sys.stdin.read(1) """ je k tomu slozity kod :)
from __future__ import print_function
import os
import platform
if platform.system() == "Windows":
os.system("pause")
else:
os.system("/bin/bash -c 'read -s -n 1 -p \"Press any key to continue...\"'")
print()
try:
input("Press enter to continue")
except SyntaxError:
pass
# import sys, os
def wait_key():
''' Wait for a key press on the console and return it. '''
result = None
if os.name == 'nt':
import msvcrt
result = msvcrt.getwch()
else:
import termios
fd = sys.stdin.fileno()
oldterm = termios.tcgetattr(fd)
newattr = termios.tcgetattr(fd)
newattr[3] = newattr[3] & ~termios.ICANON & ~termios.ECHO
termios.tcsetattr(fd, termios.TCSANOW, newattr)
try:
result = sys.stdin.read(1)
except IOError:
pass
finally:
termios.tcsetattr(fd, termios.TCSAFLUSH, oldterm)
return result