Answers for "import one python file into another"

4

python include another python file

#import all from myfile.py (in same directory)
from myfile import *
Posted by: Guest on December-23-2020
0

import one file into another python

import os

os.chdir("**Put here the directory where you have the file with your function**")

from file import function

os.chdir("**Put here the directory where you were working**")
Posted by: Guest on April-19-2021

Code answers related to "import one python file into another"

Python Answers by Framework

Browse Popular Code Answers by Language