parse files line-at-a-time
This commit is contained in:
parent
0c2731bd7f
commit
efe40c32f0
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue