only import readline module when starting interactive prompt
This commit is contained in:
parent
10d30ae5e7
commit
ffed6d35e3
@ -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# ")
|
||||
|
Loading…
Reference in New Issue
Block a user