hi,
i am confused
i have these two python files.
However it only runs one, being the main.py file. How do i run the other file?
Click the three dots and select “Show hidden files”
Scroll down and select .replit
Edit this to run whichever file you choose.
I hope that helps!
@EthanGreatorex if that helped, can you mark this as an answer? Thanks
3 Likes
At the beginning of main.py
, add one of these lines:
from q10 import * # This imports every function from the q10 Py file
import q10 # This imports every function, but you must
# use q10.function() instead of function().
from q10 import function # This imports the function "function"
# from q10, so you can use it normally "function()"
#
# This is generic Python and so will work outside of Replit.
#
# If q10 is really important, you can make it into a PyPi
# package and then in any Python Repl run "pip install q10"
# in console to then be able to import it without copying
# the file itself to another Repl. This is advanced and I
# needed help from @bigminiboss to do that.
1 Like