@@ -808,7 +808,7 @@ def create_page_highlight(self):
808
808
(*)theme_message: Label
809
809
"""
810
810
self .theme_elements = {
811
- 'Normal Text' : ('normal' , '00' ),
811
+ 'Normal Code or Text' : ('normal' , '00' ),
812
812
'Code Context' : ('context' , '01' ),
813
813
'Python Keywords' : ('keyword' , '02' ),
814
814
'Python Definitions' : ('definition' , '03' ),
@@ -819,10 +819,10 @@ def create_page_highlight(self):
819
819
'Found Text' : ('hit' , '08' ),
820
820
'Cursor' : ('cursor' , '09' ),
821
821
'Editor Breakpoint' : ('break' , '10' ),
822
- 'Shell Normal Text ' : ('console' , '11' ),
823
- 'Shell Error Text' : ('error' , '12' ),
824
- 'Shell Stdout Text ' : ('stdout' , '13' ),
825
- 'Shell Stderr Text ' : ('stderr' , '14' ),
822
+ 'Shell Prompt ' : ('console' , '11' ),
823
+ 'Error Text' : ('error' , '12' ),
824
+ 'Shell User Output ' : ('stdout' , '13' ),
825
+ 'Shell User Exception ' : ('stderr' , '14' ),
826
826
'Line Number' : ('linenumber' , '16' ),
827
827
}
828
828
self .builtin_name = tracers .add (
@@ -852,27 +852,26 @@ def create_page_highlight(self):
852
852
takefocus = FALSE , highlightthickness = 0 , wrap = NONE )
853
853
text .bind ('<Double-Button-1>' , lambda e : 'break' )
854
854
text .bind ('<B1-Motion>' , lambda e : 'break' )
855
- text_and_tags = (
856
- ('\n ' , 'normal' ),
857
- ('#you can click here' , 'comment' ), ('\n ' , 'normal' ),
858
- ('#to choose items' , 'comment' ), ('\n ' , 'normal' ),
859
- ('code context section' , 'context' ), ('\n \n ' , 'normal' ),
855
+ string_tags = (
856
+ ('# Click selects item.' , 'comment' ), ('\n ' , 'normal' ),
857
+ ('code context section' , 'context' ), ('\n ' , 'normal' ),
858
+ ('| cursor' , 'cursor' ), ('\n ' , 'normal' ),
860
859
('def' , 'keyword' ), (' ' , 'normal' ),
861
860
('func' , 'definition' ), ('(param):\n ' , 'normal' ),
862
- ('"""string"" "' , 'string' ), ('\n var0 = ' , 'normal' ),
861
+ ('"Return None. "' , 'string' ), ('\n var0 = ' , 'normal' ),
863
862
("'string'" , 'string' ), ('\n var1 = ' , 'normal' ),
864
863
("'selected'" , 'hilite' ), ('\n var2 = ' , 'normal' ),
865
864
("'found'" , 'hit' ), ('\n var3 = ' , 'normal' ),
866
865
('list' , 'builtin' ), ('(' , 'normal' ),
867
866
('None' , 'keyword' ), (')\n ' , 'normal' ),
868
867
(' breakpoint("line")' , 'break' ), ('\n \n ' , 'normal' ),
869
- (' error ' , 'error ' ), (' ' , 'normal' ),
870
- ('cursor | ' , 'cursor ' ), ('\n ' , 'normal' ),
871
- ('shell ' , 'console' ), (' ' , 'normal' ),
872
- ('stdout ' , 'stdout ' ), (' ' , 'normal' ),
873
- ('stderr ' , 'stderr' ), ('\n \n ' , 'normal' ))
874
- for texttag in text_and_tags :
875
- text .insert (END , texttag [ 0 ], texttag [ 1 ] )
868
+ ('>>> ' , 'console ' ), (' 3.14**2 \n ' , 'normal' ),
869
+ ('9.8596 ' , 'stdout ' ), ('\n ' , 'normal' ),
870
+ ('>>> ' , 'console' ), (' pri ' , 'normal' ),
871
+ ('n ' , 'error ' ), ('t( \n ' , 'normal' ),
872
+ ('SyntaxError ' , 'stderr' ), ('\n ' , 'normal' ))
873
+ for string , tag in string_tags :
874
+ text .insert (END , string , tag )
876
875
n_lines = len (text .get ('1.0' , END ).splitlines ())
877
876
for lineno in range (1 , n_lines ):
878
877
text .insert (f'{ lineno } .0' ,
0 commit comments