##// END OF EJS Templates
support `%gui qt5` in kernels...
MinRK -
Show More
@@ -1,33 +1,18 b''
1 # encoding: utf-8
1 # encoding: utf-8
2 """Event loop integration for the ZeroMQ-based kernels.
2 """Event loop integration for the ZeroMQ-based kernels."""
3 """
4
3
5 #-----------------------------------------------------------------------------
4 # Copyright (c) IPython Development Team.
6 # Copyright (C) 2011 The IPython Development Team
5 # Distributed under the terms of the Modified BSD License.
7
8 # Distributed under the terms of the BSD License. The full license is in
9 # the file COPYING, distributed as part of this software.
10 #-----------------------------------------------------------------------------
11
12
13 #-----------------------------------------------------------------------------
14 # Imports
15 #-----------------------------------------------------------------------------
16
6
7 import os
17 import sys
8 import sys
18
9
19 # System library imports
20 import zmq
10 import zmq
21
11
22 # Local imports
23 from IPython.config.application import Application
12 from IPython.config.application import Application
24 from IPython.utils import io
13 from IPython.utils import io
25
14
26
15
27 #------------------------------------------------------------------------------
28 # Eventloops for integrating the Kernel into different GUIs
29 #------------------------------------------------------------------------------
30
31 def _on_os_x_10_9():
16 def _on_os_x_10_9():
32 import platform
17 import platform
33 from distutils.version import LooseVersion as V
18 from distutils.version import LooseVersion as V
@@ -92,6 +77,12 b' def loop_qt4(kernel):'
92
77
93 start_event_loop_qt4(kernel.app)
78 start_event_loop_qt4(kernel.app)
94
79
80 @register_integration('qt5')
81 def loop_qt5(kernel):
82 """Start a kernel with PyQt5 event loop integration."""
83 os.environ['QT_API'] = 'pyqt5'
84 return loop_qt4(kernel)
85
95
86
96 @register_integration('wx')
87 @register_integration('wx')
97 def loop_wx(kernel):
88 def loop_wx(kernel):
General Comments 0
You need to be logged in to leave comments. Login now