Answers for "how to import scripts from another folder in python"

3

how to import scripts from another folder in python

# some_file.py
import sys
# insert at 1, 0 is the script path (or '' in REPL)
sys.path.insert(1, '/path/to/application/app/folder')

import file
Posted by: Guest on March-05-2020
2

import python file from another directory

from application.app.folder.file import func_name
Posted by: Guest on November-12-2020

Code answers related to "how to import scripts from another folder in python"

Python Answers by Framework

Browse Popular Code Answers by Language