Note

Click here to download the full example code or to run this example in your browser via Binder

# SyntaxError

Example script with invalid Python syntax

    Traceback (most recent call last):
      File "/build/sphinx-gallery-e2MrSc/sphinx-gallery-0.8.2/examples/no_output/plot_syntaxerror.py", line 13
        Invalid Python code
                ^
    SyntaxError: invalid syntax

    # -*- coding: utf-8 -*-
    """
    Example with SyntaxError
    ========================

    Sphinx-Gallery uses Python's AST parser, thus you need to have written
    valid python code for Sphinx-Gallery to parse it. If your script has a
    SyntaxError you'll be presented the traceback and the original code.
    """
    # Code source: Óscar Nájera
    # License: BSD 3 clause

    Invalid Python code

Estimated memory usage: 214 MB

Gallery generated by Sphinx-Gallery