import os scriptPath = input("What patch file do you want to run?") script = open(scriptPath, "r") for line in script: print(line) script.close()