Show More
@@ -37,7 +37,7 b' from zmq.eventloop.zmqstream import ZMQStream' | |||||
37 | # Local imports |
|
37 | # Local imports | |
38 | from IPython.core import pylabtools |
|
38 | from IPython.core import pylabtools | |
39 | from IPython.config.configurable import Configurable |
|
39 | from IPython.config.configurable import Configurable | |
40 |
from IPython.config.application import boolean_flag, catch_config_error |
|
40 | from IPython.config.application import boolean_flag, catch_config_error | |
41 | from IPython.core.application import ProfileDir |
|
41 | from IPython.core.application import ProfileDir | |
42 | from IPython.core.error import StdinNotImplementedError |
|
42 | from IPython.core.error import StdinNotImplementedError | |
43 | from IPython.core.shellapp import ( |
|
43 | from IPython.core.shellapp import ( | |
@@ -883,21 +883,9 b' def embed_kernel(module=None, local_ns=None, **kwargs):' | |||||
883 | on the first embed_kernel call for a given process. |
|
883 | on the first embed_kernel call for a given process. | |
884 |
|
884 | |||
885 | """ |
|
885 | """ | |
886 | try: |
|
|||
887 | from IPython.parallel.apps.ipengineapp import IPEngineApp |
|
|||
888 | except ImportError: |
|
|||
889 | # IPython.parallel has higher zmq dependency that IPython.zmq |
|
|||
890 | class IPEngineApp: |
|
|||
891 | pass |
|
|||
892 |
|
||||
893 | # get the app if it exists, or set it up if it doesn't |
|
886 | # get the app if it exists, or set it up if it doesn't | |
894 |
if App |
|
887 | if IPKernelApp.initialized(): | |
895 |
app = App |
|
888 | app = IPKernelApp.instance() | |
896 | if isinstance(app, IPEngineApp): |
|
|||
897 | app.listen_kernel() |
|
|||
898 | # return right away, because we embed in the Engine's |
|
|||
899 | # namespace, not the calling one. |
|
|||
900 | return |
|
|||
901 | else: |
|
889 | else: | |
902 | app = IPKernelApp.instance(**kwargs) |
|
890 | app = IPKernelApp.instance(**kwargs) | |
903 | app.initialize([]) |
|
891 | app.initialize([]) |
General Comments 0
You need to be logged in to leave comments.
Login now