Ask coding questions

← Back to all posts
How do I change which file to run?

When I tried to run my files after renaming them, it just said "No such file:
repl process died unexpectedly: exit status 2?"
How do I change this so that it runs the renamed files?

CoderBean (11)

make sure the file name in the code is correct...

Bookie0 (6031)

What do we have to input to get that error? Also to run your file, you have to do:

from file_name import * # imports everything from that file

# or

from file_name import module_name # you can imports variables, functions, etc.

Is this what you wanted? Not quite sure.. :)


So the default name of the file is, right? I changed it to, and it shows an error that there's "no such file:" How do I fix this issue, so that it would run even if the file name's not

Bookie0 (6031)

@STEPHENYOON1057 yep, default is And iirc you can't change the file to something else. Also why do you need to run a file that isn't main,py?