
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/no_output/plot_syntaxerror.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_auto_examples_no_output_plot_syntaxerror.py>`
        to download the full example code or to run this example in your browser via Binder

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_no_output_plot_syntaxerror.py:


SyntaxError
===========

Example script with invalid Python syntax

.. GENERATED FROM PYTHON SOURCE LINES 1-14


.. rst-class:: sphx-glr-script-out

.. code-block:: pytb

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






|

.. code-block:: python3

    # -*- 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:**  145 MB


.. _sphx_glr_download_auto_examples_no_output_plot_syntaxerror.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example


  .. container:: binder-badge

    .. image:: images/binder_badge_logo.svg
      :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/no_output/plot_syntaxerror.ipynb
      :alt: Launch binder
      :width: 150 px


  .. container:: sphx-glr-download sphx-glr-download-python

     :download:`Download Python source code: plot_syntaxerror.py <plot_syntaxerror.py>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_syntaxerror.ipynb <plot_syntaxerror.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
