0

I'm somewhat new to Python and want to clear a few things up regarding running scripts.

Alright, so here's what I want to do: I want to run a script inside of a script, and then have the first "parent" script continue running normally. I have tried using both execfile() and import file.py but they both jump to the next script and disregard the rest of the first. What I'm basically trying to do is save some code in a script, and then run the code in another script so I don't have to type that code again in the current script. Does this make sense? I can post an example if it will help clear up what I want. Any help would be greatly appreciated.

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by vegaseat
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.