Change Abaqus Python - Running scripts from external IDE
Change Abaqus Python - Running scripts from external IDE
(OP)
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!
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!





RE: Change Abaqus Python - Running scripts from external IDE
Are you new to this forum? If so, please read these FAQ:
http://www.eng-tips.com/faqs.cfm?fid=376
http://www.eng-tips.com/faqs.cfm?fid=1083
RE: Change Abaqus Python - Running scripts from external IDE
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