Skip to content

Commit 4e3673c

Browse files
Greg Bureksebastinas
Greg Burek
authored andcommitted
Fix bpython-curses bug when passed an argument
Currently, running `bpython-curses -i file.py` results in: ``` ... File ".local/share/virtualenvs/flask-ex-03Wix3mp/lib/python3.6/site-packages/bpython/cli.py", line 1905, in main_curses bpython.args.exec_code(interpreter, args) NameError: name 'bpython' is not defined ``` This PR addresses this error by correctly importing args and using it, like the curtsies implementation.
1 parent ae4a502 commit 4e3673c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bpython/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
from .translations import _
8282

8383
from . import repl
84+
from . import args as bpargs
8485
from ._py3compat import py3
8586
from .pager import page
8687
from .args import parse as argsparse
@@ -1914,7 +1915,7 @@ def main_curses(scr, args, config, interactive=True, locals_=None,
19141915
if args:
19151916
exit_value = ()
19161917
try:
1917-
bpython.args.exec_code(interpreter, args)
1918+
bpargs.exec_code(interpreter, args)
19181919
except SystemExit as e:
19191920
# The documentation of code.InteractiveInterpreter.runcode claims
19201921
# that it reraises SystemExit. However, I can't manage to trigger

0 commit comments

Comments
 (0)