1
Running a program
TimiA (0)

Hello,
I have created multiply python files however i am only able to run the first program (main.py). Is there any way of specifing the file i want to run everytime i want to run it?
Thanks

You are viewing a single comment. View All
2
JustARatherRidi (186)

Hey TimiA, while ash15khng is correct, you usually don't have more than one starting point in a project, and that's why it was made this way. In repl.it and in Python projects in general, you have something along the lines of main.py that acts as the starting point of your project. The other files in your project may contain classes, methods, or constants that you can use within your project (using import and/or open).

If you have files that run independently to each other or do different things, it's probably a good idea to make them two separate repls (using the blue 'new repl' button up top) and not two files in the same repl.

However, if your two programs are independent of each other but are related, you might want to store the two repls in one folder. You can do this in your My repls page.

Hope this helped; if something confused you, I'll be more than glad to clarify!