1

I am looking for a way to execute ABAQUS (a program) automatically from a python script with certain conditions. In Linux's command (terminal) line I type in

abq683 cae script=XX.py

and it will have ABAQUS run the script. I am aware of the python module 'subprocess' and it can run the basic program, which is the 'abq683' part of the command, however I cannot seem to find a way to have the other conditions run with it.

I am wondering if there is a way to run the full abq683 cae script=XX.py command automatically from a python text file.

Perhaps there is a way to print characters to the terminal window's active line and run them?

I am using Python2.6 on a linux machine Thank you for any help you may offer.

dnagirl
  • 19,786
  • 13
  • 77
  • 119
austinco
  • 35
  • 5
  • possible duplicate of [How do I execute a program from python? os.system fails due to spaces in path](http://stackoverflow.com/questions/204017/how-do-i-execute-a-program-from-python-os-system-fails-due-to-spaces-in-path) – agf Aug 12 '11 at 00:21

1 Answers1

0
import subprocess
retcode = subprocess.call(['abq684', 'cae', 'script=XX.py'])
agf
  • 160,324
  • 40
  • 275
  • 231