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