Sistu Srikanth Sistu Srikanth - 2 months ago 12
Python Question

How to run multiple scripts from a script in python

I have 3 Python scripts, script1, script2 and script3 in a folder. I want to run script2 and script3 using script1. How can I do this?

Rob Rob

In script1 you need to import script2 and script3:

At the top of script1:

import script2
import script3

To run a function from script2 for example:


You may also need to add a blank file called in the same directory as the scripts, so that python can see that the directory is a library.