##// END OF EJS Templates
update payload source...
MinRK -
Show More
@@ -82,7 +82,7 b' def page(strng, start=0, screen_lines=0, pager_cmd=None,'
82 pass
82 pass
83
83
84 payload = dict(
84 payload = dict(
85 source='IPython.kernel.zmq.page.page',
85 source='page',
86 text=strng,
86 text=strng,
87 html=html,
87 html=html,
88 start_line_number=start
88 start_line_number=start
@@ -419,10 +419,10 b' var IPython = (function (IPython) {'
419 // Payloads are handled by triggering events because we don't want the Kernel
419 // Payloads are handled by triggering events because we don't want the Kernel
420 // to depend on the Notebook or Pager classes.
420 // to depend on the Notebook or Pager classes.
421 for (var i=0; i<l; i++) {
421 for (var i=0; i<l; i++) {
422 if (payload[i].source === 'IPython.kernel.zmq.page.page') {
422 if (payload[i].source === 'page') {
423 var data = {'text':payload[i].text}
423 var data = {'text':payload[i].text}
424 $([IPython.events]).trigger('open_with_text.Pager', data);
424 $([IPython.events]).trigger('open_with_text.Pager', data);
425 } else if (payload[i].source === 'IPython.kernel.zmq.zmqshell.ZMQInteractiveShell.set_next_input') {
425 } else if (payload[i].source === 'set_next_input') {
426 if (callbacks.set_next_input !== undefined) {
426 if (callbacks.set_next_input !== undefined) {
427 callbacks.set_next_input(payload[i].text)
427 callbacks.set_next_input(payload[i].text)
428 }
428 }
@@ -172,7 +172,7 b' class KernelMagics(Magics):'
172
172
173 # Send the payload back so that clients can modify their prompt display
173 # Send the payload back so that clients can modify their prompt display
174 payload = dict(
174 payload = dict(
175 source='IPython.kernel.zmq.zmqshell.ZMQInteractiveShell.doctest_mode',
175 source='doctest_mode',
176 mode=dstore.mode)
176 mode=dstore.mode)
177 shell.payload_manager.write_payload(payload)
177 shell.payload_manager.write_payload(payload)
178
178
@@ -324,7 +324,7 b' class KernelMagics(Magics):'
324 filename = os.path.abspath(filename)
324 filename = os.path.abspath(filename)
325
325
326 payload = {
326 payload = {
327 'source' : 'IPython.kernel.zmq.zmqshell.ZMQInteractiveShell.edit_magic',
327 'source' : 'edit_magic',
328 'filename' : filename,
328 'filename' : filename,
329 'line_number' : lineno
329 'line_number' : lineno
330 }
330 }
@@ -536,7 +536,7 b' class ZMQInteractiveShell(InteractiveShell):'
536 """
536 """
537 new = self.prompt_manager.render('rewrite') + cmd
537 new = self.prompt_manager.render('rewrite') + cmd
538 payload = dict(
538 payload = dict(
539 source='IPython.kernel.zmq.zmqshell.ZMQInteractiveShell.auto_rewrite_input',
539 source='auto_rewrite_input',
540 transformed_input=new,
540 transformed_input=new,
541 )
541 )
542 self.payload_manager.write_payload(payload)
542 self.payload_manager.write_payload(payload)
@@ -545,7 +545,7 b' class ZMQInteractiveShell(InteractiveShell):'
545 """Engage the exit actions."""
545 """Engage the exit actions."""
546 self.exit_now = True
546 self.exit_now = True
547 payload = dict(
547 payload = dict(
548 source='IPython.kernel.zmq.zmqshell.ZMQInteractiveShell.ask_exit',
548 source='ask_exit',
549 exit=True,
549 exit=True,
550 keepkernel=self.keepkernel_on_exit,
550 keepkernel=self.keepkernel_on_exit,
551 )
551 )
@@ -583,7 +583,7 b' class ZMQInteractiveShell(InteractiveShell):'
583 """Send the specified text to the frontend to be presented at the next
583 """Send the specified text to the frontend to be presented at the next
584 input cell."""
584 input cell."""
585 payload = dict(
585 payload = dict(
586 source='IPython.kernel.zmq.zmqshell.ZMQInteractiveShell.set_next_input',
586 source='set_next_input',
587 text=text
587 text=text
588 )
588 )
589 self.payload_manager.write_payload(payload)
589 self.payload_manager.write_payload(payload)
@@ -105,10 +105,10 b' class IPythonWidget(FrontendWidget):'
105
105
106 # IPythonWidget protected class variables.
106 # IPythonWidget protected class variables.
107 _PromptBlock = namedtuple('_PromptBlock', ['block', 'length', 'number'])
107 _PromptBlock = namedtuple('_PromptBlock', ['block', 'length', 'number'])
108 _payload_source_edit = zmq_shell_source + '.edit_magic'
108 _payload_source_edit = 'edit_magic'
109 _payload_source_exit = zmq_shell_source + '.ask_exit'
109 _payload_source_exit = 'ask_exit'
110 _payload_source_next_input = zmq_shell_source + '.set_next_input'
110 _payload_source_next_input = 'set_next_input'
111 _payload_source_page = 'IPython.kernel.zmq.page.page'
111 _payload_source_page = 'page'
112 _retrying_history_request = False
112 _retrying_history_request = False
113
113
114 #---------------------------------------------------------------------------
114 #---------------------------------------------------------------------------
General Comments 0
You need to be logged in to leave comments. Login now