Show More
@@ -18,10 +18,6 b' import ctypes' | |||
|
18 | 18 | import os |
|
19 | 19 | import sys |
|
20 | 20 | import warnings |
|
21 | if os.name == 'posix': | |
|
22 | import select | |
|
23 | elif sys.platform == 'win32': | |
|
24 | import msvcrt | |
|
25 | 21 | |
|
26 | 22 | #----------------------------------------------------------------------------- |
|
27 | 23 | # Constants |
@@ -43,13 +39,16 b" GUI_PYGLET = 'pyglet'" | |||
|
43 | 39 | |
|
44 | 40 | def stdin_ready(): |
|
45 | 41 | if os.name == 'posix': |
|
42 | import select | |
|
46 | 43 | infds, outfds, erfds = select.select([sys.stdin],[],[],0) |
|
47 | 44 | if infds: |
|
48 | 45 | return True |
|
49 | 46 | else: |
|
50 | 47 | return False |
|
51 |
elif |
|
|
48 | elif os.name == 'nt': | |
|
49 | import msvcrt | |
|
52 | 50 | return msvcrt.kbhit() |
|
51 | return True # assume there's something so that we won't wait forever | |
|
53 | 52 | |
|
54 | 53 | |
|
55 | 54 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now