I'm working on my first project and am trying to figure out how something works. If I have a module that store some functions I will reference in my main program that depend on another module, where do I include the import
statement?
For example:
# Title: func.py
import os
def my_function(path):
if not os.path.isfile(path):
parser.error(f'The file {path} does not exist.')
Do I include import os
here, or can I simply have it in the main document?