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 antlr4
|
||||||
import configparser
|
import configparser
|
||||||
import logging
|
import logging
|
||||||
import readline
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from CommentMacroLexer import CommentMacroLexer
|
from CommentMacroLexer import CommentMacroLexer
|
||||||
|
@ -62,6 +61,7 @@ if __name__ == '__main__':
|
||||||
logger.debug("found macro at argv[1]")
|
logger.debug("found macro at argv[1]")
|
||||||
comment(sys.argv[1])
|
comment(sys.argv[1])
|
||||||
else:
|
else:
|
||||||
|
import readline # for input history and line editing
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
text = input("comment# ")
|
text = input("comment# ")
|
||||||
|
|
Loading…
Reference in New Issue