python.tpl
50 lines
| 1.1 KiB
| application/vnd.groove-tool-template
|
SmartyLexer
|
r9605 | {%- extends 'null.tpl' -%} | |
|
r11770 | ||
|
r9605 | {% block in_prompt %} | |
|
r11770 | # In[{{ cell.prompt_number if cell.prompt_number else ' ' }}]: | |
|
r9605 | {% endblock in_prompt %} | |
{% block output_prompt %} | |||
|
r11770 | # Out[{{ cell.prompt_number }}]: | |
{% endblock output_prompt %} | |||
|
r9605 | ||
|
r11770 | {% block input %} | |
{{ cell.input | ipython2python }} | |||
|
r9605 | {% endblock input %} | |
{# Those Two are for error displaying | |||
even if the first one seem to do nothing, | |||
it introduces a new line | |||
#} | |||
|
r11770 | {% block pyerr %} | |
{{ super() }} | |||
|
r9605 | {% endblock pyerr %} | |
{% block traceback_line %} | |||
|
r11770 | {{ line | indent | strip_ansi }} | |
{% endblock traceback_line %} | |||
|
r9605 | {# .... #} | |
{% block pyout %} | |||
|
r11770 | {{ output.text | indent | comment_lines }} | |
|
r9605 | {% endblock pyout %} | |
{% block stream %} | |||
|
r11770 | {{ output.text | indent | comment_lines }} | |
|
r9605 | {% endblock stream %} | |
{% block display_data scoped %} | |||
# image file: | |||
{% endblock display_data %} | |||
{% block markdowncell scoped %} | |||
|
r11685 | {{ cell.source | comment_lines }} | |
|
r9605 | {% endblock markdowncell %} | |
{% block headingcell scoped %} | |||
|
r11685 | {{ '#' * cell.level }}{{ cell.source | replace('\n', ' ') | comment_lines }} | |
|
r9605 | {% endblock headingcell %} | |
{% block unknowncell scoped %} | |||
|
r11770 | unknown type {{ cell.type }} | |
{% endblock unknowncell %} |