You have seen how to execute Python statements from the stand-alone Python interpreter. If your script does not access the functionality of ABAQUS/CAE, you can run the script by typing abaqus python scriptname.py at the system prompt. ABAQUS will run the script through the Python interpreter and return you to the system prompt.
If your script accesses the functionality of any of the ABAQUS/CAE modules, the statements must be interpreted by the ABAQUS/CAE kernel; you cannot run the script from the Python interpreter invoked from the system prompt. You must execute the script in ABAQUS/CAE by selecting FileRun Script from the main menu bar and selecting the file to execute. In addition, the script must contain the following statements:
from abaqus import * from abaqusConstants import *
If your script accesses and manipulates data in an output database, you can execute the script using either of the methods already described:
Type abaqus python scriptname.py at the system prompt. The script must contain the following statement:
from odbAccess import *
Select FileRun Script from the ABAQUS/CAE main menu bar, and select the file to execute. The script must contain the following statement:
from visualization import *