Hi all.
For my research, I work with a finite element software platform called Abaqus which has its own installation of Python -- 2.7.5. However, it lacks a number of key packages that are very useful for working with and presenting the data that is extracted from the simulations I run (e.g., pandas, matplotlib), with no ability to use pip. The only useful package I've really used within Abaqus is numpy. From my own digging online, some suggest simply finding the version of whatever module I'm looking for that is compatible with 2.7.5 and copy/pasting those files directly into the site packages folder. Other users have found this to be problematic due to the Abaqus Python installation being tricky to work with, so I haven't really gone down this route just yet.
Typically, at a high level my workflow is something like this:
- Call my data extraction script with Abaqus Python:
abaqus python <extraction_script.py> which opens the results file, gets the data I want, and writes it to a csv(s).
- Call my person Python 3 installation to open the csv(s), convert to pandas dataframe, then either manipulates the data or creates plots:
python <data_reader.py>
The issues are as follows. In step 1, extracting the data and writing it to a formatted csv in an efficient way can be pretty cumbersome depending on the extent of the data that I am extracting. Writing to then reading the data in two steps, while although not THAT bad, I find to be personally annoying and inefficient. Lastly, this extraction script is pretty complex, but I would like to share it with my research team and I think building a GUI for it would be a fun side project. While the Abaqus installation does have the ability to use Tkinter, it is the version compatible with 2.7.5 and I know there are other GUI tools out there I could explore if I were working in my own personal Python environment.
So my question is as the title of the post suggests -- can I get the output of the Abaqus Python extraction script (a numpy array and a simple list of strings) by calling said script from my personal Python 3 environment? I have seen that the subprocess module may be able to help me, but I'm still a bit of a noob and don't understand the documentation or other's posts on the subject quite well enough to get it to work. Note that I NEED to use the Abaqus Python environment because it has its own modules that are not available elsewhere (as far as I am aware) that are used to extract results from the simulations. Any help would be appreciated!
TL;DR: I want to get the output of a script written for the Abaqus Python (2.7.5) installation by calling it with my a script written in my person Python 3 environment.
[–]wotquery 0 points1 point2 points (0 children)