Show More
@@ -14,10 +14,14 b' Inputhook management for GUI event loop integration.' | |||
|
14 | 14 | # Imports |
|
15 | 15 | #----------------------------------------------------------------------------- |
|
16 | 16 | |
|
17 | try: | |
|
17 | 18 | import ctypes |
|
19 | except ImportError: | |
|
20 | ctypes = None | |
|
18 | 21 | import os |
|
19 | 22 | import sys |
|
20 | import warnings | |
|
23 | ||
|
24 | from IPython.utils.warn import warn | |
|
21 | 25 | |
|
22 | 26 | #----------------------------------------------------------------------------- |
|
23 | 27 | # Constants |
@@ -98,6 +102,9 b' class InputHookManager(object):' | |||
|
98 | 102 | """ |
|
99 | 103 | |
|
100 | 104 | def __init__(self): |
|
105 | if ctypes is None: | |
|
106 | warn("IPython GUI event loop requires ctypes, %gui will not be available\n") | |
|
107 | return | |
|
101 | 108 | self.PYFUNC = ctypes.PYFUNCTYPE(ctypes.c_int) |
|
102 | 109 | self._apps = {} |
|
103 | 110 | self._reset() |
General Comments 0
You need to be logged in to leave comments.
Login now