Getting started with Python scripting

We assume that BornAgain and Python are installed as explained in the installation instructions.

Verify that the Python interpreter can find BornAgain.

The next step is to run a first example script.

Then read on to understand some example scripts line by line, and to discover further functionality.

Finally, to start productive work, choose an example script that somehow ressembles your application problem, and modify it step by step.

For reference beyond this tutorial, see the API documentation

Note that all examples shown in this web site are also contained in the BornAgain source tree in directory Examples. They are covered by our automatic integration tests. If nonetheless an example does not work as expected, then please report this as a bug.