"Run" option to right-click python file menu
I believe that right now the only file that can be run in repl.it is main.py.
So if I have several runnable files in the same project, I can run them by putting "import script1.py" or "import script2.py" etc. in main.py, and changing it every time I need to run a different script, which is a bit tedious.
Is there a better way to do it? In other editors, there is a "Run" option available in right click context menu, but I could not find any equivalents in repl.it :(
Yes there is a .replit file, create a .replit file, and if you want to run a python do this
run = "python3 file_name.py"
Here is an example https://repl.it/@IntellectualGuy/PrizeDodgerblueClick#main.py
@IntellectualGuy : thanks, but I guess it is the same workload as writing import file_name.py in main.py, right?
@Yulia5 I guess, but It supports different languages, and is way easier
Maybe add this to your
.replit
file:now all you have to do is specify the file name
@Coder100 Does it work with the rightclick? Or will I have to change the filename every time I want to run a different file in the same project?
When you press run it will prompt you to input the file @Yulia5