Ask coding questions

← Back to all posts
run without main.py file?
BILLPC2684 (0)

so, i imported my repo and it doesn't use main.py
is there a way to tell repl to not use main.py and use the primary python file(py2tgr.py) instead?

Answered by Vandesm14 (2644) [earned 5 cycles]
View Answer
Comments
hotnewtop
Vandesm14 (2644)

If you create a .replit file and add the following code, you can run basically any file besides main.py:

run="python py2tgr.py"

This works in any language. Essentially it's a simplified version of a Makefile, the one used in a polygott repl.

Subscribe2 (0)

@Vandesm14 sorry this is a bit late,but it say's it can't find my file for some reason

Vandesm14 (2644)

@Subscribe2 Could you send me the link to your repl?

Vandesm14 (2644)

@Subscribe2 I actually have no idea. I suggest posting this to https://repl.it/talk/ask and if they don't know I think you should report this as a bug to https://repl.it/bugs

Subscribe2 (0)

@Vandesm14 got it thanks,before doing that I will ask the discord.py server to see if they know but thanks for you'r help.I also tried in the terminal python bot.py to run it

AllAwesome497 (386)

As far as i know, there isn't. So just copy everything in py2tgr.py file and paste it in main.py