Am 30.07.2010 13:44, schrieb leo.ruggier...@libero.it:
Dear All,

I am trying to have access to the Abaqus kernel by a Python script. My
intention is to avoid to use the Abaqus GUI (or command line) to run a
simulation.
The idea is to lunch the Python script by DOS or Python module.

The problem is that my Python script runs from the Abaqus command line or from
the GUI (menu-->file-->run script) but it doesn't run from outside.

Without knowing very much about the Abaqus command line my guess is that a special environment (env. variables, path, etc.) is set up for the Abaqus command line. In that case you need to create that environment in your DOS command window where the python script is to run or create that environment within your python script (see the os module in the standard library). But prior to that you need to know more about the environment. You could query the Abaqus command line (if it's a DOS window by invoking the python shell then using os.environ, if it's a Python you can use os.environ directly after importing os, of course). Alternatively you could examine the command file, *.bat file or whatever opens the Abaqus command shell. Probably that file has a lot of set up stuff in it.

HTH and cheers,

Jan

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to