python.tpl
56 lines
| 1.1 KiB
| application/vnd.groove-tool-template
|
SmartyLexer
/ templates / python.tpl
Matthias BUSSONNIER
|
r8997 | {%- extends 'null.tpl' -%} | ||
Matthias BUSSONNIER
|
r8994 | |||
Matthias BUSSONNIER
|
r8997 | {% block in_prompt %} | ||
Matthias BUSSONNIER
|
r9014 | # In[{{cell.prompt_number if cell.prompt_number else ' '}}]: | ||
{% endblock in_prompt %} | ||||
{% block output_prompt %} | ||||
# Out[{{cell.prompt_number}}]:{% endblock output_prompt %} | ||||
{% block input %}{{ cell.input }} | ||||
{% endblock input %} | ||||
{# Those Two are for error displaying | ||||
even if the first one seem to do nothing, | ||||
it introduces a new line | ||||
#} | ||||
{% block pyerr %}{{ super() }} | ||||
{% endblock pyerr %} | ||||
Matthias BUSSONNIER
|
r8997 | |||
{% block traceback_line %} | ||||
Matthias BUSSONNIER
|
r9014 | {{ line |indent| rm_ansi }}{% endblock traceback_line %} | ||
{# .... #} | ||||
Matthias BUSSONNIER
|
r8997 | |||
{% block pyout %} | ||||
Matthias BUSSONNIER
|
r9014 | {{ output.text| indent | pycomment}} | ||
{% endblock pyout %} | ||||
Matthias BUSSONNIER
|
r9004 | |||
{% block stream %} | ||||
Matthias BUSSONNIER
|
r8997 | {{ output.text| indent | pycomment}} | ||
Matthias BUSSONNIER
|
r9004 | {% endblock stream %} | ||
Matthias BUSSONNIER
|
r8997 | |||
Matthias BUSSONNIER
|
r9004 | {% block display_data scoped %} | ||
Matthias BUSSONNIER
|
r9014 | # image file: | ||
{% endblock display_data %} | ||||
Matthias BUSSONNIER
|
r8997 | |||
Matthias BUSSONNIER
|
r8994 | {% block markdowncell scoped %} | ||
Matthias BUSSONNIER
|
r9010 | {{ cell.source | pycomment }} | ||
{% endblock markdowncell %} | ||||
Matthias BUSSONNIER
|
r8994 | |||
{% block headingcell scoped %} | ||||
Matthias BUSSONNIER
|
r9004 | {{ '#' * cell.level }}{{ cell.source | pycomment}} | ||
Matthias BUSSONNIER
|
r8994 | {% endblock headingcell %} | ||
{% block rawcell scoped %} | ||||
Matthias BUSSONNIER
|
r9004 | {{ cell.source | pycomment }} | ||
Matthias BUSSONNIER
|
r8994 | {% endblock rawcell %} | ||
{% block unknowncell scoped %} | ||||
Matthias BUSSONNIER
|
r9004 | unknown type {{cell.type}} | ||
Matthias BUSSONNIER
|
r8994 | {% endblock unknowncell %} | ||