1
0
Fork 0

parse files line-at-a-time

This commit is contained in:
Kevin Matz 2019-07-31 08:41:34 -04:00
parent 0c2731bd7f
commit efe40c32f0
1 changed files with 4 additions and 1 deletions

View File

@ -73,7 +73,10 @@ def command(text):
if __name__ == '__main__':
if len(sys.argv) > 1:
logger.debug("found macro at argv[1]")
comment(sys.argv[1])
with open(sys.argv[1]) as f:
lines = f.readlines()
for line in lines:
command(line)
else:
import readline # for input history and line editing
while True: