##// END OF EJS Templates
This feature was discussed in #6123, but it doesn't look like anything was ever incorporated into the IPython Notebook....
This feature was discussed in #6123, but it doesn't look like anything was ever incorporated into the IPython Notebook. Here's a brief overview of the changes: - Display of messages from other clients can be toggled on and off from within a notebook, either using the ``<M-m>e`` keyboard shortcut in the web UI, or through the option in the "Kernel" menu. - notebook.js controls whether messages are displayed through a callback that is invoked from kernel.js when no callbacks are available for a message. - The UI displays ``execute_input`` messages originating from an other clients in new cells at the end of the notebook. Output messages (``execute_result`` et al.) will only be displayed if a cell exists with a matching message ID. Pending design questions: - Should each ``execute_input`` message cause a new cell to be created? - Should new cells be placed at the end of the notebook, or elsewhere? If the latter, what criteria should be followed?

File last commit:

r18589:135227ac
r19164:17ac8ca3
Show More
style_bw_ipython.tplx
45 lines | 1.5 KiB | text/plain | TextLexer
Jonathan Frederic
Added black and white ipython style
r12711 ((= Black&white ipython input/output style =))
Thomas Kluyver
Remove magic for loading templates from module names
r13925 ((*- extends 'base.tplx' -*))
Jonathan Frederic
Added black and white ipython style
r12711
%===============================================================================
% Input
%===============================================================================
((* block input scoped *))
MinRK
update nbconvert to nbformat 4
r18580 ((( add_prompt(cell.source, cell, 'In ') )))
Jonathan Frederic
Added black and white ipython style
r12711 ((* endblock input *))
%===============================================================================
% Output
%===============================================================================
MinRK
update nbconvert to nbformat 4
r18580 ((* block execute_result scoped *))
MinRK
move mime-bundle data to rich output.data...
r18589 ((*- for type in output.data | filter_data_type -*))
((*- if type in ['text/plain']*))
((( add_prompt(output.data['text/plain'], cell, 'Out') )))
Jonathan Frederic
Added black and white ipython style
r12711 ((*- else -*))
MinRK
s/prompt_number/execution_count in nbformat 4
r18587 \verb+Out[((( cell.execution_count )))]:+((( super() )))
Jonathan Frederic
Added black and white ipython style
r12711 ((*- endif -*))
((*- endfor -*))
MinRK
update nbconvert to nbformat 4
r18580 ((* endblock execute_result *))
Jonathan Frederic
Added black and white ipython style
r12711
%==============================================================================
% Support Macros
%==============================================================================
% Name: draw_prompt
% Purpose: Renders an output/input prompt
((* macro add_prompt(text, cell, prompt) -*))
MinRK
s/prompt_number/execution_count in nbformat 4
r18587 ((*- if cell.execution_count is defined -*))
((*- set execution_count = "" ~ (cell.execution_count | replace(None, " ")) -*))
Jessica B. Hamrick
Handle case where prompt number is not defined in latex templates
r18345 ((*- else -*))
MinRK
s/prompt_number/execution_count in nbformat 4
r18587 ((*- set execution_count = " " -*))
Jessica B. Hamrick
Handle case where prompt number is not defined in latex templates
r18345 ((*- endif -*))
MinRK
s/prompt_number/execution_count in nbformat 4
r18587 ((*- set indentation = " " * (execution_count | length + 7) -*))
Jonathan Frederic
Move verbatim into add prompt macro
r12720 \begin{verbatim}
MinRK
s/prompt_number/execution_count in nbformat 4
r18587 (((- text | add_prompts(first=prompt ~ '[' ~ execution_count ~ ']: ', cont=indentation) -)))
Jonathan Frederic
Move verbatim into add prompt macro
r12720 \end{verbatim}
Jonathan Frederic
Added black and white ipython style
r12711 ((*- endmacro *))