56
56
57
57
logger = logging .getLogger (__name__ )
58
58
59
- INCONSISTENT_HISTORY_MSG = u "#<---History inconsistent with output shown--->"
60
- CONTIGUITY_BROKEN_MSG = u "#<---History contiguity broken by rewind--->"
61
- HELP_MESSAGE = u """
59
+ INCONSISTENT_HISTORY_MSG = "#<---History inconsistent with output shown--->"
60
+ CONTIGUITY_BROKEN_MSG = "#<---History contiguity broken by rewind--->"
61
+ HELP_MESSAGE = """
62
62
Thanks for using bpython!
63
63
64
64
See http://bpython-interpreter.org/ for more information and
@@ -771,7 +771,7 @@ def down_one_line(self):
771
771
772
772
def process_simple_keypress (self , e ):
773
773
# '\n' needed for pastes
774
- if e in (u "<Ctrl-j>" , u "<Ctrl-m>" , u "<PADENTER>" , u "\n " , u "\r " ):
774
+ if e in ("<Ctrl-j>" , "<Ctrl-m>" , "<PADENTER>" , "\n " , "\r " ):
775
775
self .on_enter ()
776
776
while self .fake_refresh_requested :
777
777
self .fake_refresh_requested = False
@@ -796,14 +796,14 @@ def send_current_block_to_external_editor(self, filename=None):
796
796
self .cursor_offset = len (self .current_line )
797
797
798
798
def send_session_to_external_editor (self , filename = None ):
799
- for_editor = (u "### current bpython session - file will be "
800
- u "reevaluated, ### lines will not be run\n " )
801
- for_editor += u '\n ' .join (line [len (self .ps1 ):]
802
- if line .startswith (self .ps1 ) else
803
- line [len (self .ps2 ):]
804
- if line .startswith (self .ps2 ) else
805
- '### ' + line
806
- for line in self .getstdout ().split ('\n ' ))
799
+ for_editor = ("### current bpython session - file will be "
800
+ "reevaluated, ### lines will not be run\n " )
801
+ for_editor += '\n ' .join (line [len (self .ps1 ):]
802
+ if line .startswith (self .ps1 ) else
803
+ line [len (self .ps2 ):]
804
+ if line .startswith (self .ps2 ) else
805
+ '### ' + line
806
+ for line in self .getstdout ().split ('\n ' ))
807
807
text = self .send_to_external_editor (for_editor )
808
808
lines = text .split ('\n ' )
809
809
from_editor = [line for line in lines if line [:4 ] != '### ' ]
@@ -1557,8 +1557,8 @@ def just_simple_events(event_list):
1557
1557
simple_events = []
1558
1558
for e in event_list :
1559
1559
# '\n' necessary for pastes
1560
- if e in (u "<Ctrl-j>" , u "<Ctrl-m>" , u "<PADENTER>" , u "\n " , u "\r " ):
1561
- simple_events .append (u '\n ' )
1560
+ if e in ("<Ctrl-j>" , "<Ctrl-m>" , "<PADENTER>" , "\n " , "\r " ):
1561
+ simple_events .append ('\n ' )
1562
1562
elif isinstance (e , events .Event ):
1563
1563
pass # ignore events
1564
1564
elif e == '<SPACE>' :
0 commit comments