how to run a file in a python program code example Example: run python file using python code exec(open('file.py').read())