Only main.py file is running?
newly created file are not running. only main.py file runs. what is solution?
mayurkoshti12 (2)
I have two files called main.py and test.py but when I run main.py I am getting the following error:
Traceback (most recent call last):
File "main.py", line 1, in <module>
test.py
NameError: name 'test' is not defined
I have just written test.py in main.py file.
Sorry for that but I am a newbie on repl.it platform.
TheDrone7 (1777)
@mayurkoshti12 Can you please provide a link to your repl?
repl.it by default only runs the
main.py
file. That is why you may be even unable to run it. If you make other files, you can import them into your main.py file to run them. Or the better option would be to put the code that is to be run simply in themain.py
file.@TheDrone7 thanks