Examples#

The following benchmark problems showcase PyPLUTO’s capabilities using data from standard PLUTO test problems. All necessary data is bundled with the package, so no PLUTO installation is required.

After installing PyPLUTO (pip install py-pluto), examples are accessible via the command-line interface:

$ pypluto-examples list          # list all available examples
$ pypluto-examples copy          # copy example scripts to ./pypluto_examples/
$ pypluto-examples run test01_sod  # run one example directly

or through the Python API:

import pyPLUTO as pp

print(pp.examples_path())        # path to the installed examples directory
pp.copy_examples()               # copies scripts to ./pypluto_examples/
pp.run_example("test01_sod")     # runs one example script

The example scripts themselves load data via pyPLUTO.find_example(), which resolves the bundled data path regardless of the installation method.