Hi all,

I'm using Abaqus Python and I have a very long script I want to divide in multiple scripts in order to make it easier to manage. Schematically, I want to pass from

"VeryLongScript.py" -- to --> "Main.py" calling "Script1.py", "Script2.py" … etc

In matlab I would just have had to add a line "scriptname.m" to the main code, but apparently in python it's not that simple. I tried to simply add a line "Script1.py" but it doesn't find the file. I tried to use "import Script1.py", but then it seems there is no communication in terms of variables between Script1 and Main. I also tried subprocess.Popen(["python","Script1.py"]), but apparently it doesn't run the code, even if I don't get any error.

I'm new to python so I would really appreciate your help

Thank you in advance,

J

Similar questions and discussions