How to Run Learning Simulator¶
If you use the file
learningsimulator.exe on Windows, you do not need
any installation of Python, as this standalone executable comes bundles with the
required Python version.
If you use IDLE, open the file
lesim.py and run it to launch the GUI.
There is an Emacs mode for writing and running Learning Simulator scripts. It can be found at https://github.com/drghirlanda/lesim-mode. There is also an integration package for org-mode, which is a literate programming / reproducible science package for Emacs that lets you mix code in documents. With this you can have your script in the text and run it from your document directly. It can be found at https://github.com/drghirlanda/ob-lesim.
If you have a standard Python environment (that fulfils the Python Dependencies), use the below commands.
Learning Simulator can run a simulation script either from the command line or using the
lesim.py to the
python command with
the relevant arguments. To see the available arguments, use:
> python lesim.py help
Running a script from the command line¶
To run a script from the command line, use the argument
> python lesim.py run file1 [file2, file3, ...]
learningsimulator.exe on Windows:
> learningsimulator.exe run file1 [file2, file3, ...]
Running a script using the GUI¶
To launch the GUI, use the argument
> python lesim.py gui
or, for short:
> python lesim.py
learningsimulator.exe on Windows, just run that file to launch the GUI.
Once the GUI is launched, run a script by opening it (with File > Open), write a script, or paste an existing script into the script window, then run it (with Run > Simulate and Plot, or the Simulate and Plot button).