File tree 2 files changed +2
-11
lines changed
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):
40
40
sys .exit ('Cannot open file "{}".' .format (filename ))
41
41
42
42
43
- def interactive (import_readline = False ):
43
+ def interactive ():
44
44
"""
45
45
Parse user input, dump to stdout, rinse and repeat.
46
46
Python REPL style.
47
47
"""
48
- if import_readline :
49
- _import_readline ()
50
48
print_heading ()
51
49
contents = []
52
50
more = False
@@ -98,13 +96,6 @@ def parse_args(args):
98
96
return parser .parse_args (args )
99
97
100
98
101
- def _import_readline ():
102
- try :
103
- import readline # noqa: F401
104
- except ImportError :
105
- print ("[warning] readline library not available." )
106
-
107
-
108
99
def print_heading ():
109
100
print ("{} (interactive)" .format (version_str ))
110
101
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):
24
24
25
25
with patch ("builtins.print" ) as patched :
26
26
with patch ("builtins.input" , mock_input ):
27
- parse .interactive (import_readline = False )
27
+ parse .interactive ()
28
28
patched .assert_called ()
You can’t perform that action at this time.
0 commit comments