受限文字輸出框架#

此範例會擷取標準輸出並將其包含在範例中。如果輸出太長,它會自動被框成一個文字區域。

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

print("This is a long test Output\n" * 50)
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

單行輸出

print("one line out")
one line out

腳本總執行時間:(0 分 0.376 秒)

估計記憶體使用量: 176 MB

由 Sphinx-Gallery 產生的展示