ERACS Python Interface 1.1.1 (24/05/21)


About

These web pages describe the ERACS Python Interface which can be used to run ERACS calculations programmatically using the Python programming language.

Authors

Dominic Edhouse, Clive Wickham, Kevin Davey

Abbreviations

Various abbreviations are used throughout the ERACS Python Interface and its documentation. The list below is a brief summary of the most commonly used abbreviations.

Abbreviation

Description

int

Integer - the Python data type representing integer numbers

float

Float - the Python data type representing floating point (decimal) numbers

str

String - the Python data type representing a string of characters

bool

Boolean - the Python data type representing true or false

list

List - the Python data type representing an array of various values

dict

Dictionary - the Python data type representing key-value pairs

DLL

Dynamic-link library

API

Application programming interface

Supported Python Versions

  • Python 3.5+ 32-bit

Important

The 32-bit version of Python is required for the ERACS Python Interface to work.

Note

The ERACS Python Interface was developed with Python 3.5+ and the Interface may work with older versions of Python, but for best reliability use up-to-date versions of both Python and the Interface. For more information on setting up Python and the Interface, view Python Setup.

Note

Although Python 3.5+ is actively supported, lower versions of Python will likely work. For access to all features from the example scripts it’s recommended to use Python 3.6+ otherwise you’ll be unable to execute some example scripts due to dependencies.

Supported Virtual Environment Versions

  • Python 3.7+ 32-bit

The ERACS Python Interface supports the use of virtual Python environments in order to use an isolated Python installation specially configured for using the ERACS Python Interface. The Python Interface setup wizard uses venv to create the virtual environment. Venv differs between Python versions, and Python 3.7+ is recommended to ensure the virtual environment works with the ERACS Python Editor.

Notable Changes From Previous Interface Version

  • The ERACS Python Interface examples folder now includes a Diff subfolder. The Network Diff tool compares network data using XML files exported from ERACS and displays the differences via a HTML table. The Tkinter GUI has a built-in web browser for rendering the table, or the output file can be opened in your preferred installed web browser.

  • A new documentation page Examples has been added to explain the purpose of the various example scripts which come included with the ERACS Python Interface.

  • New property LoadflowRecords.TLFSetUpData.InitialTapPosition which defines the initial tap position used in a Loadflow study, which can either be the nominal position (new technique used by default in ERACS as of 3.11.0) or the mid-point (old technique used by default in ERACS prior 3.11.0).

  • New function Global.CompareSemanticVersionString() for comparing version strings in Python (e.g. “3.11.0”).

  • New property Data.TEracsData.EracsVersion which tells us the version of ERACS which exported the data file (grabbed from a field in the data file).