##// END OF EJS Templates
Merge pull request #7608 from minrk/default-location...
Merge pull request #7608 from minrk/default-location use default_url for logo link

File last commit:

r19644:db49b765
r20222:184f056b merge
Show More
client.py
71 lines | 2.3 KiB | text/x-python | PythonLexer
MinRK
update Qt to use KernelClient
r10288 """ Defines a KernelClient that provides signals and slots.
epatters
Initial checkin of Qt kernel manager. Began refactor of FrontendWidget.
r2609 """
Thomas Kluyver
Collapse Qt out of process channel class hierarchy
r19209 import atexit
import errno
from threading import Thread
import time
import zmq
# import ZMQError in top-level namespace, to avoid ugly attribute-error messages
# during garbage collection of threads at exit:
from zmq import ZMQError
from zmq.eventloop import ioloop, zmqstream
from IPython.external.qt import QtCore
epatters
Initial checkin of Qt kernel manager. Began refactor of FrontendWidget.
r2609
MinRK
update Qt to use KernelClient
r10288 # Local imports
Thomas Kluyver
Share an IOLoop among Qt channels, rather than one each
r19224 from IPython.utils.traitlets import Type, Instance
Thomas Kluyver
Remove redundant make_*_socket functions
r19442 from IPython.kernel.channels import HBChannel
MinRK
update Qt to use KernelClient
r10288 from IPython.kernel import KernelClient
Björn Linse
KernelClient: factor out generic threaded client from Qt client
r19644 from IPython.kernel.channels import InvalidPortNumber
from IPython.kernel.threaded import ThreadedKernelClient, ThreadedZMQSocketChannel
epatters
Initial checkin of Qt kernel manager. Began refactor of FrontendWidget.
r2609
Thomas Kluyver
Simplify HBChannel inheritance
r19227 from .kernel_mixins import QtKernelClientMixin
Thomas Kluyver
Collapse Qt out of process channel class hierarchy
r19209 from .util import SuperQObject
Brian Granger
Fixed high CPU usage of XREQ channel....
r2695
Thomas Kluyver
Simplify HBChannel inheritance
r19227 class QtHBChannel(SuperQObject, HBChannel):
# A longer timeout than the base class
time_to_dead = 3.0
# Emitted when the kernel has died.
kernel_died = QtCore.Signal(object)
def call_handlers(self, since_last_heartbeat):
""" Reimplemented to emit signals instead of making callbacks.
"""
# Emit the generic signal.
self.kernel_died.emit(since_last_heartbeat)
Brian Granger
Mostly final version of display data....
r3277
Thomas Kluyver
Collapse Qt out of process channel class hierarchy
r19209 from IPython.core.release import kernel_protocol_version_info
epatters
* Refactored KernelManager to use Traitlets and to have its channels as attributes...
r2611
Thomas Kluyver
Collapse Qt out of process channel class hierarchy
r19209 major_protocol_version = kernel_protocol_version_info[0]
Björn Linse
KernelClient: factor out generic threaded client from Qt client
r19644 class QtZMQSocketChannel(ThreadedZMQSocketChannel,SuperQObject):
Thomas Kluyver
Get rid of address property on channels
r19225 """A ZMQ socket emitting a Qt signal when a message is received."""
Thomas Kluyver
Collapse Qt out of process channel class hierarchy
r19209 message_received = QtCore.Signal(object)
def process_events(self):
""" Process any pending GUI events.
"""
QtCore.QCoreApplication.instance().processEvents()
def call_handlers(self, msg):
"""This method is called in the ioloop thread when a message arrives.
It is important to remember that this method is called in the thread
so that some logic must be done to ensure that the application level
handlers are called in the application thread.
"""
# Emit the generic signal.
self.message_received.emit(msg)
Thomas Kluyver
Get rid of QtIOPubChannel class
r19221
Björn Linse
KernelClient: factor out generic threaded client from Qt client
r19644 class QtKernelClient(QtKernelClientMixin, ThreadedKernelClient):
MinRK
update Qt to use KernelClient
r10288 """ A KernelClient that provides signals and slots.
epatters
* Refactored KernelManager to use Traitlets and to have its channels as attributes...
r2611 """
Thomas Kluyver
Share an IOLoop among Qt channels, rather than one each
r19224
Thomas Kluyver
Get rid of QtIOPubChannel class
r19221 iopub_channel_class = Type(QtZMQSocketChannel)
Thomas Kluyver
Get rid of Qt Shell and Stdin channels
r19220 shell_channel_class = Type(QtZMQSocketChannel)
stdin_channel_class = Type(QtZMQSocketChannel)
Brian Granger
Cleanup naming and organization of channels....
r9120 hb_channel_class = Type(QtHBChannel)