##// END OF EJS Templates
Fix bug with info requests that were not json-safe....
Fernando Perez -
Show More
@@ -27,6 +27,7 b' import zmq'
27 # Local imports.
27 # Local imports.
28 from IPython.config.configurable import Configurable
28 from IPython.config.configurable import Configurable
29 from IPython.utils import io
29 from IPython.utils import io
30 from IPython.utils.jsonutil import json_clean
30 from IPython.lib import pylabtools
31 from IPython.lib import pylabtools
31 from IPython.utils.traitlets import Instance, Float
32 from IPython.utils.traitlets import Instance, Float
32 from entry_point import base_launch_kernel, make_argument_parser, make_kernel, \
33 from entry_point import base_launch_kernel, make_argument_parser, make_kernel, \
@@ -236,11 +237,12 b' class Kernel(Configurable):'
236 io.raw_print(completion_msg)
237 io.raw_print(completion_msg)
237
238
238 def object_info_request(self, ident, parent):
239 def object_info_request(self, ident, parent):
239 ##context = parent['content']['oname'].split('.')
240 ##object_info = self._object_info(context)
241 object_info = self.shell.object_inspect(parent['content']['oname'])
240 object_info = self.shell.object_inspect(parent['content']['oname'])
241 # Before we send this object over, we turn it into a dict and we scrub
242 # it for JSON usage
243 oinfo = json_clean(object_info._asdict())
242 msg = self.session.send(self.reply_socket, 'object_info_reply',
244 msg = self.session.send(self.reply_socket, 'object_info_reply',
243 object_info._asdict(), parent, ident)
245 oinfo, parent, ident)
244 io.raw_print(msg)
246 io.raw_print(msg)
245
247
246 def history_request(self, ident, parent):
248 def history_request(self, ident, parent):
General Comments 0
You need to be logged in to leave comments. Login now