Answers for "from one py file to another"

6

run py file in another py file

os.system('python my_file.py')
Posted by: Guest on April-13-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 "from one py file to another"

Python Answers by Framework

Browse Popular Code Answers by Language