|
3 | 3 | import code |
4 | 4 | import logging |
5 | 5 | import sys |
6 | | -import time |
7 | 6 | from optparse import Option |
8 | | -from itertools import izip |
9 | 7 |
|
10 | 8 | import curtsies |
11 | 9 | import curtsies.window |
|
22 | 20 | logger = logging.getLogger(__name__) |
23 | 21 |
|
24 | 22 |
|
25 | | -repl = None # global for `from bpython.curtsies import repl` |
26 | | -#WARNING Will be a problem if more than one repl is ever instantiated this way |
| 23 | +repl = None # global for `from bpython.curtsies import repl` |
| 24 | +# WARNING Will be a problem if more than one repl is ever instantiated this way |
| 25 | + |
27 | 26 |
|
28 | 27 | def main(args=None, locals_=None, banner=None): |
29 | 28 | config, options, exec_args = bpargs.parse(args, ( |
30 | 29 | 'curtsies options', None, [ |
31 | 30 | Option('--log', '-L', action='store_true', |
32 | | - help=_("log debug messages to bpython.log")), |
| 31 | + help=_("log debug messages to bpython.log")), |
33 | 32 | Option('--type', '-t', action='store_true', |
34 | | - help=_("enter lines of file as though interactively typed")), |
| 33 | + help=_("enter lines of file as though interactively typed")), |
35 | 34 | ])) |
36 | 35 | if options.log: |
37 | 36 | handler = logging.FileHandler(filename='bpython.log') |
@@ -63,7 +62,7 @@ def main(args=None, locals_=None, banner=None): |
63 | 62 | if not options.interactive: |
64 | 63 | raise SystemExit(exit_value) |
65 | 64 | else: |
66 | | - sys.path.insert(0, '') # expected for interactive sessions (vanilla python does it) |
| 65 | + sys.path.insert(0, '') # expected for interactive sessions (vanilla python does it) |
67 | 66 |
|
68 | 67 | print(bpargs.version_banner()) |
69 | 68 | mainloop(config, locals_, banner, interp, paste, interactive=(not exec_args)) |
@@ -123,7 +122,7 @@ def process_event(e): |
123 | 122 | if paste: |
124 | 123 | process_event(paste) |
125 | 124 |
|
126 | | - process_event(None) # do a display before waiting for first event |
| 125 | + process_event(None) # do a display before waiting for first event |
127 | 126 | for _ in find_iterator: |
128 | 127 | e = input_generator.send(0) |
129 | 128 | if e is not None: |
|
0 commit comments