Scripting

This page describes recent changes in Abaqus Scripting.

2024 GA

Abaqus Python Upgrade to Version 3.10.5

Abaqus Python is updated to Version 3.10.5.
Benefits: Customers and partners can leverage the latest functionality provided in Python 3.
This feature is available only if you have an appropriate role.

Abaqus Python has been updated from Python version 2.7.15 to Python version 3.10.5.

Python 3 introduces a number of changes that break backward-compatibility with existing Python 2 code. As a result, scripts originally written using Python 2 syntax might not run without modification in Python 3. However, in most cases it is possible to modify your scripts so that they will run in both Python 2.7 and Python 3.

The following Abaqus functionality is impacted:

A conversion utility is provided to assist with converting Python 2 syntax to Python 3. While it will automatically convert many common syntax changes, not all Python 2 syntax can be converted automatically; therefore, some manual conversion might be required to ensure that Python scripts run properly with the new version. You can invoke the conversion utiility from the command line using the command

abaqus python -m abqPy2to3 <script/directory>

The utility writes a log file and saves the original versions of the files on which it operates. If you provide a directory to the utility, it recursively traverses through that directory and subdirectories looking for *.py files. You can include -future False on the command line if you are not worried about maintaining Python 2.7 forward compatibility. You can also access the conversion utility as part of the script upgrade plug-in utility in Abaqus/CAE (available from Plug-Ins > Abaqus > Upgrade Scripts). It is run if you upgrade scripts to 2024.

Additional information related to converting Python code for Abaqus is available in the SIMULIA Community at go.3ds.com/AbaqusPython.