| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4e654ef commit fc74d87
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,6 +16,9 @@ | |||
| 16 | 16 | from bpython.translations import _ | |
| 17 | 17 | from bpython.importcompletion import find_iterator | |
| 18 | 18 | ||
| 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 | + | ||
| 19 | 22 | def main(args=None, locals_=None, banner=None): | |
| 20 | 23 | config, options, exec_args = bpargs.parse(args, ( | |
| 21 | 24 | 'scroll options', None, [ | |
@@ -69,6 +72,7 @@ def event_or_refresh(timeout=None): | |||
| 69 | 72 | else: | |
| 70 | 73 | yield input_generator.send(timeout) | |
| 71 | 74 | ||
| 75 | + global repl # global for easy introspection `from bpython.curtsies import repl` | ||
| 72 | 76 | with Repl(config=config, | |
| 73 | 77 | locals_=locals_, | |
| 74 | 78 | request_refresh=request_refresh, | |
@@ -79,7 +83,6 @@ def event_or_refresh(timeout=None): | |||
| 79 | 83 | interactive=interactive, | |
| 80 | 84 | orig_tcattrs=input_generator.original_stty) as repl: | |
| 81 | 85 | repl.height, repl.width = window.t.height, window.t.width | |
| 82 | - sys.repl = repl | ||
| 83 | 86 | ||
| 84 | 87 | def process_event(e): | |
| 85 | 88 | """If None is passed in, just paint the screen""" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments