Multiple executable files in the same project
Is there a way - or plans to have a way - to have multiple executable programs in the same project (e.g. a main program and a companion script or two programs that are very closely related)? Currently I can add another .py file to one of my Python repls but I can't run it.
If you import a file, you can run it :)
See example: https://repl.it/@timmy_i_chen/multi-files-demo
EDIT: Here's a better demo: https://repl.it/@timmy_i_chen/multi-files-demo-futures
@timmy_i_chen Nice to know, for my specific use case.
Will there be a method that works with general languages instead of just the ones people have commented that allow reading from/importing files?
My original question was intended to be more about being able to choose a program to run with the Run button.
@timmy_i_chen Convenience-based, mostly. The idea is to be able to group programs that work closely together or simply aren't distinct enough to warrant separate projects. As it is now I either have to write much of the same code twice or switch out the parts that are different.
@timmy_i_chen (Apologies for necroing this post)
In case you wanted an example of what I was talking about, take a look at https://repl.it/@iamnotachuckste/A065191-family.
Currently, I have to copy-paste one of the four scripts into main.py before running it, since the Run button only targets main.py.