0

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.

3
  • If your main file is getting too big, organize it. Don't cut it in half and make two files. Commented Feb 15, 2013 at 9:55
  • look at the "import" statement and the module system Commented 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 file Commented Feb 15, 2013 at 9:58

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.