##// END OF EJS Templates
Start to think on api...
Start to think on api converter now return a tuple: the converted file and potential other resources in a dict

File last commit:

r9014:1423a345
r9182:ff78122f
Show More
python.tpl
56 lines | 1.1 KiB | application/vnd.groove-tool-template | SmartyLexer
Matthias BUSSONNIER
null template
r8997 {%- extends 'null.tpl' -%}
Matthias BUSSONNIER
starting templates
r8994
Matthias BUSSONNIER
null template
r8997 {% block in_prompt %}
Matthias BUSSONNIER
fix utf8
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
null template
r8997
{% block traceback_line %}
Matthias BUSSONNIER
fix utf8
r9014 {{ line |indent| rm_ansi }}{% endblock traceback_line %}
{# .... #}
Matthias BUSSONNIER
null template
r8997
{% block pyout %}
Matthias BUSSONNIER
fix utf8
r9014 {{ output.text| indent | pycomment}}
{% endblock pyout %}
Matthias BUSSONNIER
onlynewline
r9004
{% block stream %}
Matthias BUSSONNIER
null template
r8997 {{ output.text| indent | pycomment}}
Matthias BUSSONNIER
onlynewline
r9004 {% endblock stream %}
Matthias BUSSONNIER
null template
r8997
Matthias BUSSONNIER
onlynewline
r9004 {% block display_data scoped %}
Matthias BUSSONNIER
fix utf8
r9014 # image file:
{% endblock display_data %}
Matthias BUSSONNIER
null template
r8997
Matthias BUSSONNIER
starting templates
r8994 {% block markdowncell scoped %}
Matthias BUSSONNIER
deal with worksheets
r9010 {{ cell.source | pycomment }}
{% endblock markdowncell %}
Matthias BUSSONNIER
starting templates
r8994
{% block headingcell scoped %}
Matthias BUSSONNIER
onlynewline
r9004 {{ '#' * cell.level }}{{ cell.source | pycomment}}
Matthias BUSSONNIER
starting templates
r8994 {% endblock headingcell %}
{% block rawcell scoped %}
Matthias BUSSONNIER
onlynewline
r9004 {{ cell.source | pycomment }}
Matthias BUSSONNIER
starting templates
r8994 {% endblock rawcell %}
{% block unknowncell scoped %}
Matthias BUSSONNIER
onlynewline
r9004 unknown type {{cell.type}}
Matthias BUSSONNIER
starting templates
r8994 {% endblock unknowncell %}