is this possible? I want to execute a different scriptfile from a iron python script. My main file is getting way to big and I want to make it more readable.
-
If your main file is getting too big, organize it. Don't cut it in half and make two files.Blender– Blender2013-02-15 09:55:58 +00:00Commented Feb 15, 2013 at 9:55
-
look at the "import" statement and the module systemsnies– snies2013-02-15 09:57:49 +00:00Commented Feb 15, 2013 at 9:57
-
it is organized but I think it would be more readable if a ~5000 line block that gets executed quite often was in a different fileYui– Yui2013-02-15 09:58:37 +00:00Commented Feb 15, 2013 at 9:58
Add a comment
|
1 Answer
Why don't you reorganize your script into, say a Python module? Have a look at the Python Docs about Modules
@OP's comment: If you truely have a ~5000 lines of code in a single function you should definitely think about reorganizing your code. If you are sure about that "execute a different script" thing, take a look at subprocess.Popen, although I wouldn't advise it.
1 Comment
Yui
I didn't know about modules before, so I phrased that a bit akwardly. And I already wanted to reorganize it, thats why I asked this question.