Advertisement
d1cor

migetch_platform.py

Apr 10th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. import os, platform
  2. if platform.system() == "Windows":
  3.     import msvcrt
  4. def getch():
  5.     if platform.system() == "Linux":
  6.         os.system("bash -c \"read -n 1\"")
  7.     else:
  8.         msvcrt.getch()
  9.  
  10. print("Tipee una letra!")
  11. getch()
  12. print("\nJoya :)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement