I have two Python files: one is the main file (the file that I am trying to import), the other is a Turtle file (the file that I am trying to import the main file into). I am trying to retrieve a variable from that main file to use in my Turtle file
When I try to do from main_file import variable
on my Turtle file, it runs the entire main file, instead of importing that single variable.
I've tried doing the following:
1)
import main_file as this_file
2)
from main_file import *
but neither of them work.
I am using Python 3.7.3. Any help will be greatly appreciated.