File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,11 @@ def convert_file(filename):
4040 sys .exit ('Cannot open file "{}".' .format (filename ))
4141
4242
43- def interactive (import_readline = False ):
43+ def interactive ():
4444 """
4545 Parse user input, dump to stdout, rinse and repeat.
4646 Python REPL style.
4747 """
48- if import_readline :
49- _import_readline ()
5048 print_heading ()
5149 contents = []
5250 more = False
@@ -98,13 +96,6 @@ def parse_args(args):
9896 return parser .parse_args (args )
9997
10098
101- def _import_readline ():
102- try :
103- import readline # noqa: F401
104- except ImportError :
105- print ("[warning] readline library not available." )
106-
107-
10899def print_heading ():
109100 print ("{} (interactive)" .format (version_str ))
110101 print ("Type Ctrl-D to complete input, or Ctrl-C to exit." )
Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ def mock_input(prompt):
2424
2525 with patch ("builtins.print" ) as patched :
2626 with patch ("builtins.input" , mock_input ):
27- parse .interactive (import_readline = False )
27+ parse .interactive ()
2828 patched .assert_called ()
You can’t perform that action at this time.
0 commit comments