1
0
Fork 0

only import readline module when starting interactive prompt

This commit is contained in:
Kevin Matz 2018-10-25 15:07:55 -04:00
parent 10d30ae5e7
commit ffed6d35e3
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,6 @@ __status__ = "Prototype"
import antlr4
import configparser
import logging
import readline
import sys
from CommentMacroLexer import CommentMacroLexer
@ -62,6 +61,7 @@ if __name__ == '__main__':
logger.debug("found macro at argv[1]")
comment(sys.argv[1])
else:
import readline # for input history and line editing
while True:
try:
text = input("comment# ")