Modernize Python 2 code to get ready for Python 3

This commit is contained in:
cclauss
2018-03-21 21:41:35 +01:00
parent d521abd5d7
commit 1fa9eb3c2b
42 changed files with 169 additions and 112 deletions

View File

@@ -1,4 +1,4 @@
import sys, os
import os
#
# getch in a platform-independent way
@@ -65,11 +65,10 @@ def get_input():
if not interactive:
return True
while True:
while True:
key = ord(getch())
if key == 32: # space bar
return True
elif key == 27: # ESC
interactive = False
return True