how to exit pizza.py's interactive regime?

Dear LAMMPS Users,

First of all,
Recently I have discovered the power of Pizza.py package, and I want to say thank you to the Developers.

Problem:

I make an alias in my .bashrc script. So when I type “pizza” the interactive “>” regime shows up and I can run scripts via “@run script.py”. It runs and works. But if I want to run the script from the command line - the only thing that I have found is
" pizza -f try_run_pizza_script.py" it works , but after finishing it stays in the interactive regime.

Please tell me how can I run the script so it runs and exits the interactive regime after completing the job???

Thank you,
Vasiliy.

That is controlled by the -i switch (for interactive) on the 1st line of
src/pizza.py.

If you are invoking Pizza.py, by just typing pizza.py (or an alias to it),
then you are invoking that first line, which means it will stay interactive.

You can run it explicitly with Python by typing “python pizza.py -r yourscript.py” in
which case the 1st line is not invoked, and it will exit.

This is really a Python feature, not a Pizza.py feature.

Steve

Thank you Steve, Perhaps you might have wanted to write “python pizza.py yourscript.py” instead of “python pizza.py yourscript.py”. because when I try to run, pizza says that she doesn’t know the switch “-r”, but when i run with “-f” it works fine. Vasiliy.

yes -f, not -r, same as in your initial email.

Steve