|
38 | 38 | #TODO implement paste mode and figure out what the deal with config.paste_time is |
39 | 39 | #TODO figure out how config.auto_display_list=False behaves and implement it |
40 | 40 | #TODO figure out how config.list_win_visible behaves and implement it |
41 | | -#TODO other autocomplete modes even though I hate them |
| 41 | +#TODO other autocomplete modes |
42 | 42 | #TODO figure out what config.flush_output is |
43 | | -#TODO options.interactive, .quiet |
| 43 | +#TODO figure out what options.quiet is |
44 | 44 | #TODO execute file if in args |
45 | | -#TODO working raw_input |
| 45 | +#TODO proper raw_input (currently input isn't visible while typing, includes \r, and comes in as unicode in Python 2 |
46 | 46 | #TODO use events instead of length-one queues for interthread communication |
47 | 47 |
|
48 | 48 | from bpython.keys import cli_key_dispatch as key_dispatch |
@@ -742,9 +742,9 @@ def send_to_external_editor(self, filename=None): |
742 | 742 | editor = os.environ.get('VISUAL', os.environ.get('EDITOR', 'vim')) |
743 | 743 | text = self.getstdout() |
744 | 744 | with tempfile.NamedTemporaryFile(suffix='.py') as temp: |
745 | | - temp.write('### current bpython session - file will be reevaluated, ### lines will not be run\n') |
| 745 | + temp.write('### current bpython session - file will be reevaluated, ### lines will not be run\n'.encode('utf8')) |
746 | 746 | temp.write('\n'.join(line[4:] if line[:4] in ('... ', '>>> ') else '### '+line |
747 | | - for line in text.split('\n'))) |
| 747 | + for line in text.split('\n')).encode('utf8')) |
748 | 748 | temp.flush() |
749 | 749 | subprocess.call([editor, temp.name]) |
750 | 750 | self.history = [line for line in open(temp.name).read().split('\n') |
|
0 commit comments