/usr/share/doc/python-sphinx-gallery-doc/html/_downloads/plot_syntaxerror.ipynb is in python-sphinx-gallery-doc 0.1.13-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | {
"nbformat_minor": 0,
"nbformat": 4,
"cells": [
{
"execution_count": null,
"cell_type": "code",
"source": [
"%matplotlib inline"
],
"outputs": [],
"metadata": {
"collapsed": false
}
},
{
"source": [
"\nSyntaxError\n===========\n\nExample script with invalid Python syntax\n\n"
],
"cell_type": "markdown",
"metadata": {}
},
{
"execution_count": null,
"cell_type": "code",
"source": [
"# -*- coding: utf-8 -*-\n\"\"\"\nExample with SyntaxError\n========================\n\nSphinx-Gallery uses Python's AST parser, thus you need to have written\nvalid python code for Sphinx-Gallery to parse it. If your script has a\nSyntaxError you'll be presented the traceback and the original code.\n\n\"\"\"\n# Code source: \u00d3scar N\u00e1jera\n# License: BSD 3 clause\n\nInvalid Python code"
],
"outputs": [],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"name": "python2",
"language": "python"
},
"language_info": {
"mimetype": "text/x-python",
"nbconvert_exporter": "python",
"name": "python",
"file_extension": ".py",
"version": "2.7.14",
"pygments_lexer": "ipython2",
"codemirror_mode": {
"version": 2,
"name": "ipython"
}
}
}
}
|