1
0
Fork 0

more feedback when running a script

This commit is contained in:
Kevin Matz 2019-07-31 10:34:27 -04:00
parent 596f64f839
commit eabcd5fa56
1 changed files with 6 additions and 1 deletions

View File

@ -76,7 +76,12 @@ if __name__ == '__main__':
with open(sys.argv[1]) as f:
lines = f.readlines()
for line in lines:
command(line)
try:
print("command#", line.strip())
command(line)
except (KeyboardInterrupt):
break
print("command#", "exit")
else:
import readline # for input history and line editing
while True: