How do I link files to my main.py?
I have a simple program in one of my files(hello.py). When I run my repl this program doesn't execute. I have tried to import the file as a module but this causes other problems. I'm assuming I'm missing something simple but I would like to know what that is. :) Thanks.
@jrollo
If you are trying to import different files into main.py, the context would be this...
'''
import error
import hello
'''
Upvote Plz XD
I think you have to do from FILE import *
, but I‘M not sure. Are you trying to insert the file into main,py or are you trying to run the file instead of main.py
@Highwayman oh. That’s easy, just configure the run button using a .replit file.
https://docs.repl.it/repls/dot-replit
The command would be something like "python FILE" where FILE is the file you want to run
@Highwayman also don’t include the .py when your using the import statement. The code you have should actually be
import hello import error
Your problem is code syntax in your error file. I did some editing and it works.