Included here are step-by-step instructions intended for users who are new to Python and want to run already developed Python scripts. These instructions include downloading and installing Python, installing the few required modules needed to interface with AWR Design Environment (AWRDE), and how to run an Integrated Development Environment (IDE) that comes with the standard Python install. For users more familiar with Python and want installation instructions more intended for code development please use this link for standard Python install.

Python Install

Install Modules Required to Interface with AWRDE

Modules are common Python code files that contain functions that are called from the top level Python script. Python has many open-source modules that are available. Two of them are base requirements for interfacing Python with AWRDE: pywin32 and pyawr. The Python package installer, pip, can be used for downloading and installing these modules

Note: if a warning regarding newer pip version is available, type python -m pip install --upgrade pip

Running a Python Script

Python script files have the extension .py These files can be run directly from a Command Prompt window or from an Integrated Development Environment (IDE). Using an IDE is more convenient and is recommended for the new user. The standard Python install includes an IDE called IDLE. IDLE can be launched from Windows Start > Python x.xx > IDLE

Here is an example script that can be used for both using IDLE as well as verifying that Python can communicate with AWRDE. Please click on the link to download the Python script file:

Verify_pyawr.py

Open AWRDE and load the built-in example LPF_Lumped.emp

In AWRDE, File > Open Example

Open IDLE and in the Shell Window: File > Open and browse to Verify_pyawr.py

An IDLE Editor window should open with the Verify_pyawr.py file code shown. In this window, Run > Run Module

In the IDLE Shell window the results LPF should appear. This is a listing of the Circuit Schematics in the opened AWRDE project

Additional Modules

To run some of the example Python scripts, some additional modules may be needed. Use pip install from  a Command Prompt widow. Here are a few of the more common modules:

pip install numpy
pip install matplotlib
pip install scipy