Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add ids to ipkernel

  • Loading branch information...
commit 6174cb0a73e7186f9bb4323e15e851531bf5c4c9 1 parent ed57daf
@minrk authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 IPython/zmq/ipkernel.py
View
17 IPython/zmq/ipkernel.py
@@ -15,7 +15,7 @@
#-----------------------------------------------------------------------------
from __future__ import print_function
-# Standard library imports.
+# Standard library imports
import __builtin__
import atexit
import sys
@@ -28,10 +28,11 @@
from signal import (
signal, default_int_handler, SIGINT, SIG_IGN
)
-# System library imports.
+
+# System library imports
import zmq
-# Local imports.
+# Local imports
from IPython.core import pylabtools
from IPython.config.configurable import Configurable
from IPython.config.application import boolean_flag, catch_config_error
@@ -45,7 +46,7 @@
from IPython.utils.frame import extract_module_locals
from IPython.utils.jsonutil import json_clean
from IPython.utils.traitlets import (
- Any, Instance, Float, Dict, CaselessStrEnum, List, Set
+ Any, Instance, Float, Dict, CaselessStrEnum, List, Set, Integer, Unicode
)
from entry_point import base_launch_kernel
@@ -87,6 +88,14 @@ def _user_ns_changed(self, name, old, new):
self.shell.user_ns = new
self.shell.init_user_ns()
+ # identities:
+ int_id = Integer(-1)
+ ident = Unicode()
+
+ def _ident_default(self):
+ return unicode(uuid.uuid4())
+
+
# Private interface
# Time to sleep after flushing the stdout/err buffers in each execute
Please sign in to comment.
Something went wrong with that request. Please try again.