The Zeus Lite installer comes with an installation of Python, making it easy to get started at learning to program Python. This page walks through the steps needed to write your first Python code using Zeus Lite.
To install and upgrade pip to the latest version use the Tools, Dos Shell menu to open a command prompt and run the following Python commands.
python.exe -m ensurepip
python -m pip install --upgrade --force-reinstall --no-cache-dir pip
pip --version
To create some example Python code use the Templates feature as shown in the image below:
As per that image, select the Templates panel, select the Python Document Type from the dropdown list, select the New File option and save the resulting code to the example.py file.
With the example.py as the active file, use the Macros, Execute 'example.py Script menu as shown below:
This menu opens up the Python execution window and runs the currently active file using the Python interpreter. The result will be the following execution window:
As per the instructions found in the Python code and reflected in the execution window, type in some data and hit enter to complete the execution of the example.py file.
The execution of the script will now be complete, and Zeus Lite will capture the output produced and display that output inside the editor as shown below:
It is also possible to do a basic syntax check of the Python file from inside the editor. With the example.py as the active file, use the Compiler, Compile menu to run the syntax check.
As an example, assume the indent level of the last print statement is wrong. After running the check on the broken file, the following output will be produced:
Click on the line of error output and Zeus Lite will navigate to the file and line number that is at fault.
To get more information about the Python programming language and to start learning the language, make sure the example.py is the active file, and then use the Macros, Python Reference Manual menu. This will open up the Python documentation inside the browser window.