Write and Edit the Program Code in a Python Program
The topics in this section only apply to Python programs that you want the Geo SCADA Expert server to execute.
To enter code for a Python program that Geo SCADA Expert is to execute, you edit that Python Program item in the database. To do this:
-
In the Database Bar, either double-click on the Python Program item or right-click on it and select the Edit Python Program option from the context-sensitive menu.
The Python Program is displayed in Design mode.
-
Enter your program code in the editor.
You can optionally refer to code that is stored in Python Library items in the database. If you do, remember that you can only refer to Python Library code which is stored in the Python Libraries that are listed in the Python Libraries field. The field is on the configuration form of the Python Program item (see Specify any Python Libraries that a Python Program is to Use).
For information about how you refer to Python Library code in your Python programs, see Refer to Code that is in a Python Library Item.
The rest of the topics in this section explain the minimum code that you need to include in your Python programs. We also provide some basic examples of the type of code that you might want to include in those programs.
Before writing your programs, read and familiarize yourself with the information that is in the separate 'Python client library for Geo SCADA Expert' documentation suite (see Access the Documentation about the Python Client Library).
For detailed sample Python programs, see the Example Projects database.