##// END OF EJS Templates
Catch interrupted poll() in terminal console...
Catch interrupted poll() in terminal console Alternative to my own PR #8108 - catch ZMQError in run_cell, and if it's caused by an interrupt, ignore it. more complex, especially if we want to handle the timeout nicely as proposed in the comments, but it's possibly also more convenient for other users of that API. Or perhaps not - I'm not sure what makes sense for other API consumers in this case. Fixes gh-8105

File last commit:

r18589:135227ac
r20836:0b3b28de
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 *))