Thank you for the info, I will give it a shot. The program though is started by a shell script, is there a better way to run it then in the terminal? Because by doing that, with the code you gave me, will not give me the desired output model. I tried to use subprocess, but I am still not seeing a way to put model = ... at the end of my script, and have it saved as a variable in the python console. Did that make sense at all?