Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Abaqus Python - Running scripts from external IDE

Status
Not open for further replies.

AJFR

Bioengineer
Joined
May 1, 2014
Messages
4
Location
CA
Hello All,

I am developing some Python scripts for Abaqus. I run them from IEP (Interactive Editor for Python) on Python 2.7.6.

In the parts that I have to call Abaqus, however, I have to go to Abaqus-based Python (2.6) otherwise within IEP, Abaqus is not recognized, neither I can import any of its modules like OdbAccess.

I was wondering if there is a way to make my IEP and Python 2.7 as my default running Python communicating with Abaqus?

The main reasons for such thing is that first, its much more convenient to write in the editor, and second, I have imported lots of cool modules that are otherwise not available in Abaqus Python.

I thought there should be a way to tell Abaqus to use another version of Python in the other directory...I tried to copy and paste all the abaqus lib files to my Python 2.7 lib folder but I get the following error when trying to import Abaqus module from the IEP:

ImportError: Bad magic number in c:\python27\lib\abaqusConstants.pyc


Thanks a lot for your input in advance!
 
Hello IceBreakerSours,

Thanks for your suggestion. I'll do it.
For now, I just decided to go on developing the main part of the script in IDE and call Abaqus based scripts within this script as an external process and have the Abaqus run them. Not too happy with the code integrity and cleanness but does the job till I find a solution to this.

A
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top