Ask coding questions

← Back to all posts
How to delete main.py or change the default execution file?
TeamAthena

How to delete main.py or change the default execution file?

Voters
PontusSandh
farhadhossain13
elHuracan101
LuisRuiz1
TeamAthena
Comments
hotnewtop
RAYYANCYCLEGAR

Hey, I know this was asked a while ago, but for any people who visit this question in the future, you can use

elHuracan101

import os
os.remove('main.py')

Highwayman

Oh also, if you want to just change the file of execution, then use a .replit file (https://docs.repl.it/repls/dot-replit)
repl.it has a handy executable called run-project that you might want to take a look at for that..

Highwayman

Actually... maybe you can.. if you go on share and click hot, code100’s empty repl should still be there. Just fork it, go in the console and type touch main_filename. where main_filename is the file you want to be your file. Then just put your stuff in the file created That might work

Highwayman

@Highwayman actually, no you can’t fork his repl. But you probably can still make an empty repl the way he shows you and then put in a .replit and all that.

ash15khng

Sadly you can't do that on repl.it