Answers for "importing python modules from different script in another directory #"

16

import python module from another directory

import sys
# sys.path is a list of absolute path strings
sys.path.append('/path/to/application/app/folder')

import file
Posted by: Guest on April-12-2020
0

Python, importing other scripts from other directories

import sys
sys.path.insert(0, 'path/to/your/py_file')

import py_file
Posted by: Guest on June-07-2021

Code answers related to "importing python modules from different script in another directory #"

Python Answers by Framework

Browse Popular Code Answers by Language