##// END OF EJS Templates
Summary of changes:...
Summary of changes: 1) IPython/core/compilerop.py: IronPython __future__ flags are non-standard, Solution try/except; comment added 2) IPython/core/completer.py: __main__ was undefined, due to local mistake in creating IronPython scope; removed this tweak 3) IPython/core/prompts.py: os.getuid() is not defined (IronPython bug; see: https://mail.python.org/pipermail/ironpython-users/2014-February/016812.html) 4) IPython/lib/inputhook.py: ctypes SystemError; comment added 5) IPython/utils/process.py and IPython/utils/_process_cli.py: adds a new _process_cli.py which would handle the processes under cli; fixed os.pathsep 6) IPython/utils/io.py: devnull opened in append mode; changed to "w" 7) New issue: IPython/external/decorator/_decorator.py: IronPython doesn't have _getframes, unless FullFrames is set to true; comment added

File last commit:

r11457:17a57099
r15208:301956c6
Show More
manager.py
53 lines | 1.6 KiB | text/x-python | PythonLexer
MinRK
add QtKernelManager with restarter
r10308 """ Defines a KernelClient that provides signals and slots.
"""
from IPython.external.qt import QtCore
# Local imports
MinRK
set default client_class for QtKernelManager...
r11457 from IPython.utils.traitlets import Bool, DottedObjectName
MinRK
add QtKernelManager with restarter
r10308
from IPython.kernel import KernelManager
from IPython.kernel.restarter import KernelRestarter
from .kernel_mixins import QtKernelManagerMixin, QtKernelRestarterMixin
class QtKernelRestarter(KernelRestarter, QtKernelRestarterMixin):
def start(self):
if self._timer is None:
self._timer = QtCore.QTimer()
self._timer.timeout.connect(self.poll)
self._timer.start(self.time_to_dead * 1000)
def stop(self):
self._timer.stop()
def poll(self):
super(QtKernelRestarter, self).poll()
class QtKernelManager(KernelManager, QtKernelManagerMixin):
"""A KernelManager with Qt signals for restart"""
MinRK
set default client_class for QtKernelManager...
r11457 client_class = DottedObjectName('IPython.qt.client.QtKernelClient')
MinRK
add QtKernelManager with restarter
r10308 autorestart = Bool(True, config=True)
def start_restarter(self):
if self.autorestart and self.has_kernel:
if self._restarter is None:
self._restarter = QtKernelRestarter(
kernel_manager=self,
MinRK
use `parent=self` throughout IPython...
r11064 parent=self,
MinRK
add QtKernelManager with restarter
r10308 log=self.log,
)
MinRK
s/register_callback/add_callback/
r10317 self._restarter.add_callback(self._handle_kernel_restarted)
MinRK
add QtKernelManager with restarter
r10308 self._restarter.start()
def stop_restarter(self):
if self.autorestart:
if self._restarter is not None:
self._restarter.stop()
def _handle_kernel_restarted(self):
self.kernel_restarted.emit()