How do you run another file from main.py?
Jalcon (19)

Right now were creating a program called Jalcon Industrial:
https://repl.it/@Jalcon/jalcon-industrial
And there is a /run command which runs other programs on different .py documents, so we were wondering how you can run those files from the main program?

P.S To run the python program you may have to open it in a new tab with this:

You are viewing a single comment. View All
Answered by ArchieMaclean (584) [earned 5 cycles]
View Answer
ArchieMaclean (584)

@ArchieMaclean btw, if you need some code to run when you import it, just put the code in the file (test.py) and it will run when (note that it usually runs at the start of the program (main.py), not when it is imported)