diff --git a/templates/python.tpl b/templates/python.tpl index 8d2f880..40cfc5e 100644 --- a/templates/python.tpl +++ b/templates/python.tpl @@ -6,17 +6,17 @@ {% if cell.outputs %} # Out[{{cell.prompt_number}}]: {%- for output in cell.outputs -%} - {% if output.output_type in ['pyout','stream']%} + {%- if output.output_type in ['pyout','stream']%} {{ output.text| indent | pycomment}} - {% elif output.output_type in ['display_data'] %} -{{"# fucking display_data"}} - {% elif output.output_type in ['pyerr'] %} -{% for line in output.traceback %} + {%- elif output.output_type in ['display_data'] %} +{{"# image file: fucking display_data"}} + {%- elif output.output_type in ['pyerr'] %} + {%- for line in output.traceback %} {{ line |indent| rm_ansi}} + {%- endfor %} + {%- endif %} {%- endfor -%} - {%- endif -%} -{%- endfor -%} -{%endif%} +{% endif %} {% endblock codecell %}