rerun file after change python code example Example: rerun file after change python import os import sys os.execv(sys.executable, ['python'] + sys.argv)