Answers for "python import something in other directory"

1

how to import a module from a different directory in python

from folder import module

OR

import folder.module as module
Posted by: Guest on September-12-2021
-1

how to import somthing from another directory in pyhon

# 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 December-11-2020

Code answers related to "python import something in other directory"

Python Answers by Framework

Browse Popular Code Answers by Language