File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1616from bpython .translations import _
1717from bpython .importcompletion import find_iterator
1818
19+ repl = None # global for `from bpython.curtsies import repl`
20+ #WARNING Will be a problem if more than one repl is ever instantiated this way
21+
1922def main (args = None , locals_ = None , banner = None ):
2023 config , options , exec_args = bpargs .parse (args , (
2124 'scroll options' , None , [
@@ -69,6 +72,7 @@ def event_or_refresh(timeout=None):
6972 else :
7073 yield input_generator .send (timeout )
7174
75+ global repl # global for easy introspection `from bpython.curtsies import repl`
7276 with Repl (config = config ,
7377 locals_ = locals_ ,
7478 request_refresh = request_refresh ,
@@ -79,7 +83,6 @@ def event_or_refresh(timeout=None):
7983 interactive = interactive ,
8084 orig_tcattrs = input_generator .original_stty ) as repl :
8185 repl .height , repl .width = window .t .height , window .t .width
82- sys .repl = repl
8386
8487 def process_event (e ):
8588 """If None is passed in, just paint the screen"""
You can’t perform that action at this time.
0 commit comments