Answers for "how to run a python code froom a fike"

15

run python file using python code

exec(open('file.py').read())
Posted by: Guest on May-24-2020
0

How to run a File using python

import subprocess  #imports the module thats needed
subprocess.call([r'C:\Users\Ron\Desktop\Test\current_date.bat'])  #runs the file in the given directory
Posted by: Guest on November-05-2021

Code answers related to "how to run a python code froom a fike"

Python Answers by Framework

Browse Popular Code Answers by Language