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

    Click :ref:`here <sphx_glr_download_auto_examples_no_output_plot_strings.py>` to download the full example code or run this example in your browser via Binder
.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_no_output_plot_strings.py:


Constrained Text output frame
=============================

This example captures the stdout and includes it in the
example. If output is too long it becomes automatically
framed into a text area.


.. code-block:: python


    # Code source: Óscar Nájera
    # License: BSD 3 clause

    print('This is a long test Output\n' * 50)





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

 Out:

 .. code-block:: none

    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output
    This is a long test Output


One line out



.. code-block:: python


    print('one line out')




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

 Out:

 .. code-block:: none

    one line out


**Total running time of the script:** ( 0 minutes  0.001 seconds)


.. _sphx_glr_download_auto_examples_no_output_plot_strings.py:


.. only :: html

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


  .. container:: binder-badge

    .. image:: https://static.mybinder.org/badge.svg
      :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/no_output/plot_strings.ipynb
      :width: 150 px


  .. container:: sphx-glr-download

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



  .. container:: sphx-glr-download

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


.. only:: html

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

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