e^SrSSKrSSKJrJrJrJrJrJrJ r J r J r J r J r JrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r SSK!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r. SSKJ/r/ SSK0J1r2 SSKJ3r3 SSK4J5r5J6r6 SSK7J8r8 SS K9J:r: SS K;Jr>J?r? SS K@JArA SS KBJCrC SSKDJErE SSKFJGrG SSKHJIrI SSKJJKrK SSK@JLrL \6"5rM\C\E\G\I\K4rN"SS\5rOSqP"SS\"5rQ"SS\"5rR"SS\"5rS"SS\"5rT"SS\"5rU"S S!\"5rV"S"S#\#5rW"S$S%5rX\X"5rYS&rZS'S(S)S*S+S,.r[S-r\"S.S/\"5r]\^S0:XaSS1K_J`r` \`"S2S3S4S59 SS6KaJbrb \b"\O5 gg)7aIDLE Configuration Dialog: support user customization of IDLE by GUI Customize font faces, sizes, and colorization attributes. Set indentation defaults. Customize keybindings. Colorization and keybindings can be saved as user defined sets. Select startup options including shell/editor and default window size. Define additional help sources. Note that tab width in IDLE is currently fixed at eight due to Tk issues. Refer to comments in EditorWindow autoindent code for details. N)ToplevelListboxCanvas StringVar BooleanVarIntVarTRUEFALSETOPBOTTOMRIGHTLEFTSOLIDGROOVENONEBOTHXYWEEWNSNSEWNW HORIZONTALVERTICALANCHORACTIVEENDTclError) Frame LabelFrameButton CheckbuttonEntryLabel OptionMenuNotebook Radiobutton ScrollbarStyleSpinboxCombobox) colorchooser) messagebox)idleConf ConfigChanges) GetKeysWindow) DynOptionMenu)macosx) SectionName HelpSource) view_text) AutoComplete) CodeContext) ParenMatch)FormatParagraph)Squeezer)ScrollableTextFramecp^\rSrSrSrSSSS.SjjrSrSrSrS r S r U4S jr S r S r SrSrU=r$) ConfigDialog-zConfig dialog for IDLE. F)_htest_utestc[R"X5 XlU(a0UlU(dUR 5 UR U=(d S5 UR 5S-nUR5U(dSOS-nURSUSU35 UR5 UR[[S9 URU5 URSUR5 URR R#5 [$R'5 U(d1UR)5 UR+5 UR-5 gg) a{Show the tabbed dialog for user configuration. Args: parent - parent of this dialog title - string which is the title of this popup dialog _htest - bool, change box location when running htest _utest - bool, don't wait_window when running unittest Note: Focus set on font page fontlist. Methods: create_widgets cancel: Bound to DELETE_WINDOW protocol. zIDLE Preferences+heightwidthWM_DELETE_WINDOWN)r__init__parent instance_dictwithdrawtitle winfo_rootx winfo_rootygeometrycreate_widgets resizabler transientprotocolcancelfontpagefontlist focus_settracersattachgrab_set wm_deiconify wait_window)selfrMrPrArBxys :/opt/imh/python3.13/lib/python3.13/idlelib/configdialog.pyrLConfigDialog.__init__1s  $' #%F  MMO 5../    2 %    fB# > !AaSk"  e51 v ($++6 ((*  MMO        cL[USS9=UlnURRSS9 [U5=Uln[ U5Ul[X R 5Ul[X R5Ul [X R 5Ul [U5Ul[U5UlUR#URSS9 UR#URSS9 UR#URSS9 UR#URS S9 UR#UR S S9 UR#UR S S9 UR%5 UR'[([*[,S 9 UR/5R'[0S 9 g)aCreate and place widgets for tabbed dialog. Widgets Bound to self: frame: encloses all other widgets note: Notebook highpage: HighPage fontpage: FontPage keyspage: KeysPage winpage: WinPage shedpage: ShedPage extpage: ExtPage Methods: create_action_buttons load_configs: Load pages except for extensions. activate_config_changes: Tell editors to reload. paddingnwes)stickyz Fonts text Highlightsz Keys z Windows z Shell/Ed ExtensionssideexpandfillrrN)r!framegridr(noteExtPageextpageHighPagehighpageFontPagerYKeysPagekeyspageWinPagewinpageShedPageshedpageaddenable_traversalpackr r rcreate_action_buttonsr )rarvrxs rdrTConfigDialog.create_widgets`s:$#433 U v&#E?* Dt}  ||4  }}5  ||4 t}    Y/ \2 X. K0 \2 L1  s4d 3 ""$))v)6rfc[R"5(a0nOSS0n[URSS9n[USS9n0UlSUR 4SUR 4SUR4SUR44HFupE[U4XE[S .UD6URU'URUR[S S 9 MH [USS S 9R[S9 UR[S9 U$)aaReturn frame of action buttons for dialog. Methods: ok apply cancel help Widget Structure: outer: Frame buttons: Frame (no assignment): Button (ok) (no assignment): Button (apply) (no assignment): Button (cancel) (no assignment): Button (help) (no assignment): Frame rj)riOkApplyCancelHelp)rncommand takefocusrh)rrpadxr)rI borderwidthru)r4isAquaTkr!rvbuttonsokapplyrXhelpr#r rrr r )ra padding_argsouter buttons_frametxtcmds rdr"ConfigDialog.create_action_buttonss$ ??  L%v.Ldjj!,eQ/  477O djj ! t{{ # TYY  !HC !'}!83!&!8*6!8DLL  LL  " "1 " 5! eA1-222<' rfcDUR5 UR5 g)z*Apply config changes, then dismiss dialog.N)rdestroyras rdrConfigDialog.oks  rfcUR5 [R5 URR 5 UR 5 g)z+Apply config changes and leave dialog open.N)deactivate_current_configchangessave_allrzsave_all_changed_extensionsactivate_config_changesrs rdrConfigDialog.applys6 &&( 002 $$&rfcL[R5 UR5 g)z8Dismiss config dialog. Methods: destroy: inherited N)rclearrrs rdrXConfigDialog.cancels   rfc>URRRSS5qUR 5 [ TU]5 g)N1.0end)rY font_samplegetfont_sample_text grab_releasesuperr)ra __class__s rdrConfigDialog.destroys6==4488F  rfc URRURR5SS9R5n[ US[ [ RUS5-S9 g)z|Create textview for config dialog help. Attributes accessed: note Methods: view_text: Method from textview module. rn)optionzHelp for IDLE preferences)rPcontentsN)rxtabselectstripr7 help_common help_pagesr)rapages rdrConfigDialog.helpsQyy}}TYY--/}?EEG$9&z~~dB'?? Arfc^URRHnUR5 M g)z/Remove current key bindings in current windows.N)rMrNRemoveKeybindings)rainstances rdr&ConfigDialog.deactivate_current_configs" 11H  & & (2rfc8URRHcnUR5 UR5 UR 5 UR 5 UR 5 UR5 Me [HnUR5 M g)zApply configuration changes to current windows. Dynamically update the current parent window instances with some of the configuration changes. N) rMrNResetColorizer ResetFontset_notabs_indentwidthApplyKeybindingsreset_help_menu_entriesupdate_cursor_blink reloadablesreload)rarklasss rdr$ConfigDialog.activate_config_changessu  11H  # # %     + + -  % % '  , , .  ( ( * 2!E LLN!rf) rrzrYrvr|rrxrMrr)r)__name__ __module__ __qualname____firstlineno____doc__rLrTrrrrXrrrr__static_attributes__ __classcell__rs@rdr?r?-sL-5-^$7L&P ' A) rfr?u^ AaBbCcDdEeFfGgHhIiJj 1234567890#:+=(){}[] ¢£¥§©«®¶½ĞÀÁÂÃÄÅÇÐØß ɐɕɘɞɟɤɫɮɰɷɻʁʃʆʎʞʢʫʭʯ ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκ БбДдЖжПпФфЧчЪъЭэѠѤѬӜ אבגדהוזחטיךכלםמןנסעף ابجدهوزحطي٠١٢٣٤٥٦٧٨٩ ०१२३४५६७८९अआइईउऊएऐओऔ ௦௧௨௩௪௫௬௭௮௯அஇஉஎ 〇一二三四五六七八九 汉字漢字人木火土金水 가냐더려모뵤수유즈치 あいうえおアイウエオ cJ^\rSrSrU4SjrSrSrSrSrS Sjr Sr U=r $) r}ic>[TU]U5 URUlUR5 UR 5 gN)rrLhighlight_samplecreate_page_font load_font_cfg)ramasterr|rs rdrLFontPage.__init__s6  ( 9 9  rfc [R[U5UR5Ul[R[U5UR5Ul[R[ U5UR5Ul[US[SS9n[US[SS9n[U5n[U5n[U[SS9n[USS[S 9UlURR!S UR"5 URR!S UR"5 URR!S UR"5 [%U5nUR'URR(S 9 URR'UR*S9 [USS9n[-X@R S5Ul[1X@RSSSS9Ul[5U5nUR6UlUR8R'[:SSS9 UR8R=[>[@5 URCSSS9 URESSS9 URGSSSSS9 URGSSSSSSS9 URI[JSS[LS9 URI[JSS[LS9 URI[J[NS9 URRI[[P[LS9 URI[[RS 9 URI[[NS9 UR.RI[[NS9 UR2RI[[NS!S"9 URI[P[TS#9 g)$ajReturn frame of widgets for Font tab. Fonts: Enable users to provisionally change font face, size, or boldness and to see the consequence of proposed choices. Each action set 3 options in changes structuree and changes the corresponding aspect of the font sample on this page and highlight sample on highlight page. Function load_font_cfg initializes font vars and widgets from idleConf entries and tk. Fontlist: mouse button 1 click or up or down key invoke on_fontlist_select(), which sets var font_name. Sizelist: clicking the menubutton opens the dropdown menu. A mouse button 1 click or return key sets var font_size. Bold_toggle: clicking the box toggles var font_bold. Changing any of the font vars invokes var_changed_font, which adds all 3 font options to changes and calls set_samples. Set_samples applies a new font constructed from the font vars to font_sample and to highlight_sample on the highlight page. Widgets for FontPage(Frame): (*) widgets bound to self frame_font: LabelFrame frame_font_name: Frame font_name_title: Label (*)fontlist: ListBox - font_name scroll_font: Scrollbar frame_font_param: Frame font_size_title: Label (*)sizelist: DynOptionMenu - font_size (*)bold_toggle: Checkbutton - font_bold frame_sample: LabelFrame (*)font_sample: Label rz Shell/Editor Font rreliefrnz Font Sample (Editable) z Font Face :)justifyrnTrIrexportselectionzzr)yscrollcommandzSize :rmNrBold)variableonvalueoffvaluern)wraprJrIweightrh)rowcolumnrpadyrnsew)rrrowspanrrrlrrrrrtrranchorrq)rrrtrDrrrr)rsrt)+r\rrvar_changed_font font_name font_sizer font_boldr"rr!r&rrr rZbindon_fontlist_selectr*configyviewsetr3sizelistr$ bold_toggler=rnrrinsertrrcolumnconfigure rowconfigurerwrr rrr rr) ra frame_font frame_sampleframe_font_nameframe_font_paramfont_name_title scroll_fontfont_size_titlefont_sample_frames rdrFontPage.create_page_font!sL!Yt_d6K6KL Yt_d6K6KL Z%5t7L7LM !F%:< !$Af'AC  + ,MC*.G  .0G0GH ,d.E.EF .0G0GH0 4==#6#67 KOO< 0x@%&6M & >>AF40 =,11 T1= %56 Qq) !A&Aaaa8a111!'  ) #AAA>3QQQ?#a0 T:d+$q1 Q/ 4;d6rfc>[R"USS5nUSR5nUSnUSS:Hn[[ [ R "U555nUH#nURR[U5 M% URR U5 UVs/sHowR5PM nnURU5n URRU 5 URRU 5 URRU 5 URRU 5 UR"R%SU5 UR&R U5 UR)5 gs snf![ a NYf=f) zLoad current configuration settings for the font options. Retrieve current font with idleConf.GetFont and font families from tk. Setup fontlist and set font_name. Setup sizelist, which sets font_size. Set font_bold. Call set_samples. main EditorWindowrrrbold)78910111213141618202225293440N)r0GetFontlowersortedrtkfontfamiliesrZrrrindexsee select_set select_anchoractivate ValueErrorrSetMenur set_samples) raconfigured_fontrrrfontsfontslc_fontscurrent_font_indexs rdrFontPage.load_font_cfgzs\#**4H#A&,,. #A& $Q'/ s6??4012D MM d + 9%',-u!GGIu- !) !:  MM  0 1 MM $ $%7 8 MM ' '(: ; MM " "#5 6 O' ) 9% .   s)F A=F FFcPURR5n[RSSSU5 URR5n[RSSSU5 UR R5n[RSSSU5 UR 5 g)zStore changes to font attributes. When one font attribute changes, save them all, as they are not independent from each other. In particular, when we are overriding the default font, we need to write out everything. rrr7z font-sizez font-boldN)rrr add_optionrrr4raparamsvalues rdrFontPage.var_changed_fonts""$6>65A""$6>;F""$6>;F rfcURRURRS:Xa[O[ 5nUR RUR55 g)zHandle selecting a font from the list. Event can result from either mouse click or Up or Down key. Set font_name and example displays to selection. KeyReleaseN) rZrtypenamerrrrr))raeventr7s rdrFontPage.on_fontlist_selectsE }}  **//\9vG 4::<(rfc&URR5nURR5(a[RO[R nX R R5U4nX@RS'X@RS'g)zUpdate update both screen samples with the font settings. Called on font initialization and change events. Accesses font_name, font_size, and font_bold Variables. Updates font_sample and highlight page highlight_sample. r7N) rrrr+BOLDNORMALrrr)rarFr font_weightnew_fonts rdr4FontPage.set_samplessjNN&&( %)^^%7%7%9%9fkkv}} ~~113[A#+ (0f%rf)rrrrrrZrrr) rrrrrLrrrrr4rrrs@rdr}r}s) W7r D ) 1 1rfr}c^\rSrSrU4SjrSrSrSrSrSr Sr S r S r S r S rS rSrSrSrSrSrSrSrSrSrSrU=r$)r{ic>[TU]U5 X lUR5Ul[ U5UlUR5 UR5 gr) rrLrzwinfo_toplevelcdr+stylecreate_page_highlightload_theme_cfgrarrzrs rdrLHighPage.__init__sH   '')6]  ""$ rfc  ^0SS_SS_SS_SS_S S _S S _S S_SS_SS_SS_SS_SS_SS_SS_SS_SS _Tl[R[T5TR5Tl[R[T5TR 5Tl[T5Tl [R[T5TR5Tl [R[T5TR5Tl [R[T5TR5Tl[!TS!["S"S#9n[!TS!["S$S#9n[%U[&S%S&9nUR(=nTlUR-S'S(S%S%[.S)[0S*9 UR3S+S,5 UR3S-S.5 S/nUHupgUR5[6Xg5 M [9UR;S0[65R=55n[?S%U5H2n UR5U S13U [9[AU55S23S33S 5 M4 TRH,n U 4U4S4jjn URCTRU S5U 5 M. S6US7'TRDR-S8S%S9S:9 [GUS8S;9Tl$[GU5n [KTRHSS)S?9Tl)[UU TRS%S@TRVSA9Tl,[UU TRS)SBTRVSA9Tl-TRR]S%5 [KUSCTR^S=9Tl0[cUSDSE9n [UUTRS%TRdSFSG9Tl3[UUTRS)TRdSHSG9Tl4[QUTR S>S>SI9Tl5[QUTRS>S>SI9Tl6[KUSJTRnS=9Tl8[cUS!SK9Tl9URu[vSLSL[x[zSM9 URu[|SLSL[~SN9 TRHRu[|SLSL[~SN9 U Ru[|SLS)SO9 URu[|SLSL[x[zSM9 TRNRu[|[x[~SPSQSR9 TRRRu[|[x[~SPSSSR9 TRXRu[v[ST9 TRZRu[[ST9 TR`Ru[[~SLSLSU9 U Ru[|[SLSLSV9 TRfRu[|[SLSW9 TRhRu[|[SLS!SV9 TRjRu[|[~SLSLSU9 TRlRu[|[~[SLSLSX9 TRpRu[|[~SLSLSU9 TRrRu[|[~SLSY9 g>)ZaReturn frame of widgets for Highlights tab. Enable users to provisionally change foreground and background colors applied to textual tags. Color mappings are stored in complete listings called themes. Built-in themes in idlelib/config-highlight.def are fixed as far as the dialog is concerned. Any theme can be used as the base for a new custom theme, stored in .idlerc/config-highlight.cfg. Function load_theme_cfg() initializes tk variables and theme lists and calls paint_theme_sample() and set_highlight_target() for the current theme. Radiobuttons builtin_theme_on and custom_theme_on toggle var theme_source, which controls if the current set of colors are from a builtin or custom theme. DynOptionMenus builtinlist and customlist contain lists of the builtin and custom themes, respectively, and the current item from each list is stored in vars builtin_name and custom_name. Function paint_theme_sample() applies the colors from the theme to the tags in text widget highlight_sample and then invokes set_color_sample(). Function set_highlight_target() sets the state of the radiobuttons fg_on and bg_on based on the tag and it also invokes set_color_sample(). Function set_color_sample() sets the background color for the frame holding the color selector. This provides a larger visual of the color for the current tag and plane (foreground/background). Note: set_color_sample() is called from many places and is often called more than once when a change is made. It is invoked when foreground or background is selected (radiobuttons), from paint_theme_sample() (theme is changed or load_cfg is called), and from set_highlight_target() (target tag is changed or load_cfg called). Button delete_custom invokes delete_custom() to delete a custom theme from idleConf.userCfg['highlight'] and changes. Button save_custom invokes save_as_new_theme() which calls get_new_theme_name() and create_new() to save a custom theme and its colors to idleConf.userCfg['highlight']. Radiobuttons fg_on and bg_on toggle var fg_bg_toggle to control if the current selected color for a tag is for the foreground or background. DynOptionMenu targetlist contains a readable description of the tags applied to Python source within IDLE. Selecting one of the tags from this list populates highlight_target, which has a callback function set_highlight_target(). Text widget highlight_sample displays a block of text (which is mock Python code) in which is embedded the defined tags and reflects the color attributes of the current theme and changes for those tags. Mouse button 1 allows for selection of a tag and updates highlight_target with that tag value. Note: The font in highlight_sample is set through the config in the fonts tab. In other words, a tag can be selected either from targetlist or by clicking on the sample text within highlight_sample. The plane (foreground/background) is selected via the radiobutton. Together, these two (tag and plane) control what color is shown in set_color_sample() for the current theme. Button set_color invokes get_color() which displays a ColorChooser to change the color for the selected tag/plane. If a new color is picked, it will be saved to changes and the highlight_sample and frame background will be updated. Tk Variables: color: Color of selected target. builtin_name: Menu variable for built-in theme. custom_name: Menu variable for custom theme. fg_bg_toggle: Toggle for foreground/background color. Note: this has no callback. theme_source: Selector for built-in or custom theme. highlight_target: Menu variable for the highlight tag target. Instance Data Attributes: theme_elements: Dictionary of tags for text highlighting. The key is the display name and the value is a tuple of (tag name, display sort order). Methods [attachment]: load_theme_cfg: Load current highlight colors. get_color: Invoke colorchooser [button_set_color]. set_color_sample_binding: Call set_color_sample [fg_bg_toggle]. set_highlight_target: set fg_bg_toggle, set_color_sample(). set_color_sample: Set frame background to target. on_new_color_set: Set new color and add option. paint_theme_sample: Recolor sample. get_new_theme_name: Get from popup. create_new: Combine theme with changes and save. save_as_new_theme: Save [button_save_custom]. set_theme_type: Command for [theme_source]. delete_custom: Activate default [button_delete_custom]. save_new: Save to userCfg['theme'] (is function). Widgets of highlights page frame: (*) widgets bound to self frame_custom: LabelFrame (*)highlight_sample: Text (*)frame_color_set: Frame (*)button_set_color: Button (*)targetlist: DynOptionMenu - highlight_target frame_fg_bg_toggle: Frame (*)fg_on: Radiobutton - fg_bg_toggle (*)bg_on: Radiobutton - fg_bg_toggle (*)button_save_custom: Button frame_theme: LabelFrame theme_type_title: Label (*)builtin_theme_on: Radiobutton - theme_source (*)custom_theme_on: Radiobutton - theme_source (*)builtinlist: DynOptionMenu - builtin_name (*)customlist: DynOptionMenu - custom_name (*)button_delete_custom: Button (*)theme_message: Label zNormal Code or Textnormalz Code ContextcontextzPython KeywordskeywordzPython Definitions definitionzPython BuiltinsbuiltinzPython CommentscommentzPython Stringsstringz Selected Texthilitez Found TexthitCursorcursorzEditor Breakpointbreakz Shell Promptconsolez Error TexterrorzShell User OutputstdoutzShell User Exceptionstderrz Line Number linenumberrz Custom Highlighting rz Highlighting Theme r)rr)courier rhand2r)r7rbrJrIrhighlightthicknessrzcgNrces rd0HighPage.create_page_highlight..osrfz cgrnrorps rdrrrsps7rf)")z# Click selects item.r] rX)zcode context sectionrYru)z| cursorrbru)defrZ) rX)funcr[)z (param): rX)z"Return None."r^)z var0 = rX)z'string'r^)z var1 = rX)z 'selected'r_)z var2 = rX)z'found'r`)z var3 = rX)listr\)(rX)NonerZ)z) rX)z breakpoint("line")rc)z rXz>>>rd)z 3.14**2 rX)z9.8596rfrur})z pri rX)nre)zt( rX) SyntaxErrorrgrurz.0drxc<>TRRU5 gr)highlight_targetr)rFelemras rdtem+HighPage.create_page_highlight..tems%%))$/rfzdisabledstateframe_color_set.TFramesolid)rr)rRzChoose Color for :rnrN)rl Foreground)rr@rnr BackgroundzSave as New Custom Themez Select : rmza Built-in Themerr@rrnza Custom ThemerzDelete Custom Themerrhrrrrrsrtrrrrr)rrrsrtrrrrrrrtrrrrrrrr)rrrtrrr)rrrtr)Dtheme_elementsr\rrvar_changed_builtin_name builtin_namevar_changed_custom_name custom_namer fg_bg_togglevar_changed_colorcolorvar_changed_theme_source theme_sourcevar_changed_highlight_targetrr"rr=rrnr configurer rrrrlenr splitlinesrangestrtag_bindrRr!frame_color_setr# get_colorbutton_set_colorr3 targetlistr)set_color_sample_bindingfg_onbg_onrsave_as_new_themebutton_save_customr&set_theme_typebuiltin_theme_oncustom_theme_on builtinlist customlist delete_custombutton_delete_custom theme_messagerrr rr rrr rr )ra frame_custom frame_theme sample_framern string_tagsr^tagn_lineslinenoelementrframe_fg_bg_toggletheme_type_titles` rdrSHighPage.create_page_highlightshj !8 I y  !,  y  y h X % h  I '  #H!" <#&$KK$!>!>@";;$!=!=?&t,[[$!7!79 #KK4 $"?"?A ' $!B!B!D "$Af'>@  1V&<> +U; '3'8'88t$ (!AD  B %'89 -!239 $'KF KKV )'dhhuc*5578Aw'F KK6(" !3s7|#4"5Q!67q9$ &(**G ' 0 MM''02CS J + #W  51$+  -$\9QR"<0 &$$+?!(($$d&;&;T#$&!"T->->a!4+H+HJ !"T->->a!4+H+HJ  a "(#=..#0!;? +d&7&7q++2D!F +d&7&7q++2B D)T..dD'T--tTC$*"7**%,!#;A> t!!DtLc: !!s!CSqq9qqD  B ""Dqqq"Q #dK T!, U1- $$&qqq$I3qqqA ""AA"> !!s111!E 3QQQ? #AaaaH !!&&Caaa&H Sqq9rfc .URR[R"SSSSSS95 [R"5nURR 5(a[R "SS5nUR5 URRX!5 [R "SS5nUR5 U(d7URRS 5 URRS 5 OURRX"S 5 O[R "SS5nUR5 URRX!5 [R "SS5nUR5 URRX"S 5 UR5 [UR 5nUR"RX3S 5 UR%5 UR'5 g ) arLoad current configuration settings for the theme options. Based on the theme_source toggle, the theme is set as either builtin or custom and the initial widget values reflect the current settings from idleConf. Attributes updated: theme_source: Set from idleConf. builtinlist: List of default themes from idleConf. customlist: List of custom themes from idleConf. custom_theme_on: Disabled if there are no custom themes. custom_theme: Message with additional information. targetlist: Create menu from self.theme_elements. Methods: set_theme_type paint_theme_sample set_highlight_target rThemedefaultboolrrDr highlightuserr- no custom themes -rN)rrr0 GetOption CurrentThemerGetSectionListsortrr3rrrrrrzrrpaint_theme_sampleset_highlight_target)racurrent_option item_list theme_namess rdrTHighPage.load_theme_cfgs* h00D E"..0    " " // ;GI NN     $ $Y ? // DI NN $$**=9  $$%;<'' Q<@ // DI NN  OO # #I > // ;GI NN     $ $Y! = 4../   ^< ! !!#rfcSnURR5nX2;a_[R"SSS5U;a[R SSSUS5 [R SSSU5 SUR S'O?[R SSSU5 [R SSSS 5 S UR S'UR5 g ) zProcess new builtin theme selection. Add the changed theme's name to the changed_items and recreate the sample with the values from the selected theme. )z IDLE ClassiczIDLE NewrrrErname2zNew theme, see HelprnrN)rrr0rrr=rr)rar? old_themesr@s rdr!HighPage.var_changed_builtin_names 2 !!%%'  "!!&'6:*L""67FJqMJ   vw ?)>D  v &   vw >   vw <)+D  v & !rfcURR5nUS:wa)[RSSSU5 UR 5 gg)zProcess new custom theme selection. If a new custom theme is selected, add the name to the changed_items and apply the theme to the sample. rrrrEN)rrrr=rr>s rdr HighPage.var_changed_custom_namesF   $$& * *   vw >  # # % +rfcURR5n[RSSSU5 U(aUR 5 gUR 5 g)z{Process toggle between builtin and custom theme. Update the default toggle value and apply the newly selected theme type. rrrN)rrrr=rrr>s rdr!HighPage.var_changed_theme_sourcesG !!%%'67Iu=   ) ) +  ( ( *rfc$UR5 g)zProcess change to color choice.N)on_new_color_setrar?s rdrHighPage.var_changed_color*s rfc$UR5 g)z5Process selection of new target tag for highlighting.N)rrs rdr%HighPage.var_changed_highlight_target. !!#rfc^URR5(a:SURS'SURS'URR S5 gSURS'UR R S5 SURS'URR S5 g)a>Set available screen options based on builtin or custom theme. Attributes accessed: theme_source Attributes updated: builtinlist customlist button_delete_custom custom_theme_on Called from: handler for builtin_theme_on and custom_theme_on delete_custom create_new load_theme_cfg rXrrrz !disabledN)rrrrrrrrs rdrHighPage.set_theme_type2s$    " "(0D  W %'1DOOG $  % % + +M :(2D  W %  & &~ 6'/DOOG $  % % + +N ;rfcURR5nURRURSS5n[ R "USU-US9up4U(aXB:waURR5(aHSnURU5nU(dgURU5 URRU5 gURRU5 ggg)aBHandle button to select a new color for the target tag. If a new color is selected while using a builtin theme, a name must be supplied to create a custom theme. Attributes accessed: highlight_target frame_color_set theme_source Attributes updated: color Methods: get_new_theme_name create_new rR backgroundzPick new color for : )rMrP initialcolorz_Your changes will be saved as a new Custom Theme. Enter a name for your new Custom Theme below.N) rrrRlookuprr.askcolorrget_new_theme_name create_newrr)ratarget prev_color rgbTuplet color_stringmessage new_themes rdrHighPage.get_colorNs$&&**,ZZ&&t';';G'D'35 "."7"7#:6#A'#)  \7  $$&&K 33G<  OOI.JJNN<0 |,8 $ 1 1 5 5 7 7 \%%..s: 5%Hrfc:URR5(aURR5nOURR5nURHnURUn[ R "X5nUS:Xa[ R "US5SUS'U[S;a2[SUnUS-U;a XSS-US'US-U;a XSS-US'URR"U40UD6 M UR5 g) ajApply the theme colors to each element tag in the sample text. Instance attributes accessed: theme_elements theme_source builtin_name custom_name Attributes updated: highlight_sample: Set the tag elements to the theme. Methods: set_color_sample Called from: var_changed_builtin_name var_changed_custom_name load_theme_cfg rbrXrrz -foregroundrz -backgroundN) rrrrrr0 GetHighlightrrrr)rar element_titlercolors theme_dicts rdrHighPage.paint_theme_samples(    " "%%))+E$$((*E!00M))-8G**5:F("'/'<'<x())5(7|$ ,,$[1%8 ]*j8+5 6M+NF<(]*j8+5 6M+NF<(  ! ! , ,W ? ?1 rfc[RSRU5 UH*nX#n[RSRXU5 M, g)zSave a newly created theme to idleConf. theme_name - string, the name of the new theme theme - dictionary containing the new theme rNr0userCfg AddSection SetOption)rar rrr@s rdr HighPage.save_newsI %00<GNE   [ ) 3 3J Orfc.[R"U0UD6$rr/askyesnorarkwargss rdr'HighPage.askyesno#""D3F33rfcvURR5nSnURSX!-US9(dgURR 5 [ R SU5 [R"SS5nUR5 U(d8URRS5 URRUS5 OURRX3S 5 URR[R S R#S S 55 UR$R[R S R#S S 55 [ R'5 UR(R+5 URR-5 UR/5 g)aHandle event to delete custom theme. The current theme is deactivated and the default theme is activated. The custom theme is permanently removed from the config file. Attributes accessed: custom_name Attributes updated: custom_theme_on customlist theme_source builtin_name Methods: deactivate_current_config save_all_changed_extensions activate_config_changes set_theme_type z.Are you sure you wish to delete the theme %r ?z Delete ThemerMNrrrrrrrrrE)rrr'rQrrdelete_sectionr0rrrrrr3rr defaultCfgGetrrrzrrr)rar delmsgrs rdrHighPage.delete_custom'sJ,%%))+ A}}!4TC  ))+{J7++FK@   & &} 5 OO # #I/E F OO # #I| < h11&9==gyQR h11&9==gvNO 002 '') rf)rrrrrrrrQrrrrrzrrrrrrRrrrr)rrrrrLrSrTrrrrrrrrrrrrrrrr r'rrrrs@rdr{r{sz}:~1$f"& & + $<8$-L I ,&P 8 I$& P P4--rfr{c^\rSrSrU4SjrSrSrSrSrSr Sr S r S r S r S rS rSrSr\S5rSrSrSrU=r$)r~iWc>[TU]U5 X lUR5UlUR 5 UR 5 gr)rrLrzrPrQcreate_page_keys load_key_cfgrUs rdrLKeysPage.__init__Ys=   '')  rfc  [R[U5UR5Ul[R[U5UR 5Ul[R[U5UR5Ul [R[U5UR5Ul [US[SS9n[US[SS9n[U5n[USS9n[!U5n[!U["S9n[%U[&[&S9UlUR(R+S UR,5 UR(R.US 'UR(R0US 'UR2UR(S 'UR2UR(S '[5US UR6SS9Ul[;S5Vs/sHn[USSS9PM nn[=USURSUR>SS9Ul [=USURSUR>SS9Ul![EUSURSSS9Ul#[EUSUR SSS9Ul$[5USSURJS9Ul&[5USSURNS9Ul([USSS9Ul)URU[VSS[X[ZS9 URU[VSS[ZS9 UR8RU[V[\SSS9 URU[^SS[X[ZS9 URaSSS 9 URcSSS 9 UReSSS[fS!9 UR(ReSS[hS"9 UReSS[jS"9 UReSS[lS"9 UR@ReSS[f[j-S"9 URBReSS[f[j-S"9 URFReSS[hS"9 URHReSS[hS"9 URRReSS[hSSS#9 URLRU[^[\S$SS%9 URPRU[^[\S$SS%9 USRU[n[ZS$S&9 USRU[n[\S$SS'9 gs snf)(aReturn frame of widgets for Keys tab. Enable users to provisionally change both individual and sets of keybindings (shortcut keys). Except for features implemented as extensions, keybindings are stored in complete sets called keysets. Built-in keysets in idlelib/config-keys.def are fixed as far as the dialog is concerned. Any keyset can be used as the base for a new custom keyset, stored in .idlerc/config-keys.cfg. Function load_key_cfg() initializes tk variables and keyset lists and calls load_keys_list for the current keyset. Radiobuttons builtin_keyset_on and custom_keyset_on toggle var keyset_source, which controls if the current set of keybindings are from a builtin or custom keyset. DynOptionMenus builtinlist and customlist contain lists of the builtin and custom keysets, respectively, and the current item from each list is stored in vars builtin_name and custom_name. Button delete_custom_keys invokes delete_custom_keys() to delete a custom keyset from idleConf.userCfg['keys'] and changes. Button save_custom_keys invokes save_as_new_key_set() which calls get_new_keys_name() and create_new_key_set() to save a custom keyset and its keybindings to idleConf.userCfg['keys']. Listbox bindingslist contains all of the keybindings for the selected keyset. The keybindings are loaded in load_keys_list() and are pairs of (event, [keys]) where keys can be a list of one or more key combinations to bind to the same event. Mouse button 1 click invokes on_bindingslist_select(), which allows button_new_keys to be clicked. So, an item is selected in listbindings, which activates button_new_keys, and clicking button_new_keys calls function get_new_keys(). Function get_new_keys() gets the key mappings from the current keyset for the binding event item that was selected. The function then displays another dialog, GetKeysDialog, with the selected binding event and current keys and allows new key sequences to be entered for that binding event. If the keys aren't changed, nothing happens. If the keys are changed and the keyset is a builtin, function get_new_keys_name() will be called for input of a custom keyset name. If no name is given, then the change to the keybinding will abort and no updates will be made. If a custom name is entered in the prompt or if the current keyset was already custom (and thus didn't require a prompt), then idleConf.userCfg['keys'] is updated in function create_new_key_set() with the change to the event binding. The item listing in bindingslist is updated with the new keys. Var keybinding is also set which invokes the callback function, var_changed_keybinding, to add the change to the 'keys' or 'extensions' changes tracker based on the binding type. Tk Variables: keybinding: Action/key bindings. Methods: load_keys_list: Reload active set. create_new_key_set: Combine active keyset and changes. set_keys_type: Command for keyset_source. save_new_key_set: Save to idleConf.userCfg['keys'] (is function). deactivate_current_config: Remove keys bindings in editors. Widgets for KeysPage(frame): (*) widgets bound to self frame_key_sets: LabelFrame frames[0]: Frame (*)builtin_keyset_on: Radiobutton - var keyset_source (*)custom_keyset_on: Radiobutton - var keyset_source (*)builtinlist: DynOptionMenu - var builtin_name, func keybinding_selected (*)customlist: DynOptionMenu - var custom_name, func keybinding_selected (*)keys_message: Label frames[1]: Frame (*)button_delete_custom_keys: Button - delete_custom_keys (*)button_save_custom_keys: Button - save_as_new_key_set frame_custom: LabelFrame frame_target: Frame target_title: Label scroll_target_y: Scrollbar scroll_target_x: Scrollbar (*)bindingslist: ListBox - on_bindingslist_select (*)button_new_keys: Button - get_new_keys & ..._name rz Custom Key Bindings rz Key Set zAction - Key(s)rmorient)rrrrrxscrollcommandzGet New Keys for Selectionr)rnrrr)rjrrzUse a Built-in Key SetrzUse a Custom Key SetNrzDelete Custom Key SetrzSave as New Custom Key Setrrhrrrr)rr columnspanrlrrrl)rrrlrrT)rrrtrsrrrrtrs)rrrtrsr)8r\rrrrrrrvar_changed_keyset_source keyset_sourcevar_changed_keybinding keybindingr"rr!r&r*rrr bindingslistron_bindingslist_selectrxviewrr# get_new_keysbutton_new_keysrr) set_keys_typebuiltin_keyset_oncustom_keyset_onr3rrdelete_custom_keysbutton_delete_custom_keyssave_as_new_key_setbutton_save_custom_keys keys_messagerr r rrrr r rwrrrrr ) rarframe_key_sets frame_target target_titlescroll_target_yscroll_target_xiframess rdr5KeysPage.create_page_keys`sd$KK$!>!>@";;$!=!=?$[[4 $"@"@B!++$! "!F,. $!FF\* \0AB #L1#LD#uF 2#:: <%)%6%6%<%< "%)%6%6%<%< ".=.A.A*+.=.A.A*+%#?)) = !8%#aqA# %!,q D$6$6a**1I"K!,q D$6$6a**1G!I)q 4,,dDB'q 4++T4A)/q 7//*1&(.q <00(2$"&); vAAdNaadC !!vAAA!Ft!!DtL$$Qq$1!!!A!.aaB 1Qt<1R81R8 ##!AbD#A ""q1R4"@ !Ad; 1T: 1Qt!!L &&++AdQR+S $$))t!Dq)Qq Cd48q Ca1=W%sS*c URR[R"SSSSSS95 [R"5nURR 5(a[R "SS5nUR5 URRX!5 [R "SS5nUR5 U(d7URRS 5 URRS 5 OURRX"S 5 O[R "SS5nUR5 URRX!5 [R "SS5nUR5 URRU[R"55 UR5 [R"5nUR!U5 g ) z?Load current configuration settings for the keybinding options.rKeysrrrrkeysrr- no custom keys -rN)r@rr0r CurrentKeysrrrrr3rJrrr default_keysrHload_keys_list)rarr keyset_names rdr6KeysPage.load_key_cfgsv x11  C D"--/    ! ! # # // 6BI NN     $ $Y ? //?I NN %%++M:  $$%9:'' Q<@ //?I NN  OO # #I > // 6BI NN     $ $Y0E0E0G H **,  K(rfcSnURR5nX2;a_[R"SSS5U;a[R SSSUS5 [R SSSU5 SUR S'O?[R SSSU5 [R SSSS 5 S UR S'URU5 g ) z%Process selection of builtin key set.)zIDLE Classic WindowszIDLE Classic UnixzIDLE Classic MaczIDLE Classic OSXrrYrErrzNew key set, see HelprnrN)rrr0rrr=rOr^)rar?old_keysr@s rdr!KeysPage.var_changed_builtin_names  !!%%'  !!&&&9I""6668A;G   vvw >(?D  f %   vvvu =   vvw ;(*D  f % E"rfcURR5nUS:wa*[RSSSU5 UR U5 gg)z$Process selection of custom key set.r[rrYrEN)rrrr=r^r>s rdr KeysPage.var_changed_custom_name3sF  $$& ( (   vvvu =    & )rfcURR5n[RSSSU5 U(aUR 5 gUR 5 g)z:Process toggle between builtin key set and custom key set.rrYrN)r@rrr=rrr>s rdr?"KeysPage.var_changed_keyset_source:sE""&&(669e<   ) ) +  ( ( *rfcURR5nURR5nURR[5R 5Sn[ R"U5(a[RSX4U5 g[ R"U5nUS-n[RSXdU5 g)zStore change to a keybinding.rrZ _cfgBindings extensionsN) rBrrrCrsplitr0 IsCoreBindingrr=GetExtnNameForEvent)rar?r@key_setrFext_nameext_keybind_sections rdrAKeysPage.var_changed_keybindingCs##%""&&(!!%%f-335a8  ! !% ( (   vwu =33E:H"*^";    |-@ Orfc^URR5(a:SURS'SURS'URR S5 gSURS'UR R S5 SURS'URR S5 g)z@Set available screen options based on builtin or custom key set.rXrrrrN)r@rrrrLrrJrs rdrHKeysPage.set_keys_typeOs    ! ! # #(0D  W %'1DOOG $  * * 0 0 ?(2D  W %  ! ! ' ' 7'/DOOG $  * * 0 0 @rfcURR[5nURRU5nUR 5SnUR R5(aUR R5nOURR5n[R"5nU[S;a)[SUnUHnXgR 5XW'M [UR55n[USUU5Rn U (GaUR R5(abSn URU 5n U (d7URR!U5 URR#U5 gUR%U 5 URR'U5 URR)XS-U -5 URR!U5 URR#U5 UR*R-U 5 gURR!U5 URR#U5 g)a.Handle event to change key binding for selected line. A selection of a key/binding in the list of current bindings pops up a dialog to enter a new binding. If the current key set is builtin and a binding has changed, then a name for a custom key set needs to be entered for the change to be applied. rrZz Get New KeyszcYour changes will be saved as a new Custom Key Set. Enter a name for your new Custom Key Set below.N - )rCr-rrrkr@rrr0GetCurrentKeySetrrzvaluesr2rget_new_keys_namer/r0create_new_key_setdeleterrBr) ra list_indexbinding bind_namecurrent_key_set_namecurrent_bindingskey_set_changesrFcurrent_key_sequencesnew_keysr new_keysets rdrFKeysPage.get_new_keys[s&&,,V4 ##'' 3MMOA&    ! ! # ##'#4#4#8#8#: #'#3#3#7#7#9 #446 76? 2%fo.BCO(*9*@*F*F*H ') $%5%<%<%> ? ~y%''-v  !!%%''N!33G< !%%00<%%33J?++J7    $ $Z 0    $ $Z51I J    ( ( 4    + +J 7 OO   )    ( ( 4    + +J 7rfc[R"SS5[R"SS5-n[USX5RnU$)z)Return new key set name from query popup.rrZrzNew Custom Key Setr)rarrrs rdrxKeysPage.get_new_keys_namesJ--ff='' 6:;  *GAAG rfcXURS5nU(aURU5 gg)z@Prompt for name of new key set and save changes using that name.zNew Key Set Name:N)rxry)ra new_keys_names rdrMKeysPage.save_as_new_key_sets)../BC   # #M 2 rfc:URRS5 g)z6Activate button to assign new keys to selected action.rN)rGrrarFs rdrDKeysPage.on_bindingslist_selects "">2rfcrURR5(aURR5nOURR5n[R "U5n0nUHnUSSnSR X55nXtU'M! U[S;a[SUnUH nXXE'M URX5 [R"SS5n U R5 URRX5 URRS5 UR5 g)zCreate a new custom key set with the given name. Copy the bindings/keys from the previously active keyset to the new keyset and activate the new custom keyset. rrxrZrrN)r@rrrr0 GetCoreKeysjoinrsave_new_key_setrrrr3rrH) ranew_key_set_nameprev_key_set_name prev_keysrrF event_namer|rcustom_key_lists rdryKeysPage.create_new_key_sets    ! ! # # $ 1 1 5 5 7  $ 0 0 4 4 6 (():; EqJhhy/0G#*Z   /%fo.?@O("1"8) .9"11&&A B q! rfcSnURR5(a!SnURR[5n[R "U5n[ U5nUR5 URRS[5 UHmnSRXF5nUSSnU[S;aU[SU;a[SUUnURR[US-U-5 Mo U(aRURRW5 URRU5 URRU5 g g ) zReload the list of action/key binding pairs for the active key set. An action/key binding can be selected to change the key binding. FTrrxrrrZruN)rC curselectionr-rr0 GetKeySetrzrrzrrrrr.r/r0)rar_reselectr{keyset bind_namesr}keys rdr^KeysPage.load_keys_lists-     ) ) + +H**008J##K0&\    C(#I((6,-C!!BIgfo- <<!&/+6yAC    $ $S)E/#*= >$     ! !* -    ( ( 4    + +J 7 rfc[RSRU5 UH*nXn[RSRXU5 M, g)a!Save a newly created core key set. Add keyset to idleConf.userCfg['keys'], not to disk. If the keyset doesn't exist, it is created. The binding/keys are taken from the keyset argument. keyset_name - string, the name of the new key set keyset - dictionary containing the new keybindings rZNr )r_rrFr@s rdrKeysPage.save_new_key_setsI  ++K8EME   V $ . .{5 Irfc.[R"U0UD6$rr&r(s rdr'KeysPage.askyesnor+rfcURR5nSnURSX!-US9(dgURR 5 [ R SU5 [R"SS5nUR5 U(d8URRS5 URRUS5 OURRX3S 5 URR[R S R#S S 55 UR$R[R S R#S S 5=(d [R&"55 [ R)5 UR*R-5 URR/5 UR15 g)zHandle event to delete a custom key set. Applying the delete deactivates the current configuration and reverts to the default. The custom key set is permanently deleted from the config file. z0Are you sure you wish to delete the key set %r ?zDelete Key Setr-NrZrrr[rrrYrrE)rrr'rQrrr.r0rrrJrrr3r@rr/r0rr]rrzrrrH)rar_r1rs rdrKKeysPage.delete_custom_keyss`&&**, C}} 6#7F  ))+v{3++FF;   ! ! ' ' 6 OO # #I/C D OO # #I| < x226: #FI 6 8 h11&9==ffM9!)!6!6!8 :  002 '') rf)rCrIrrrLrGrNrQrJrrrzrBrOr@)rrrrrLr5r6rrr?rArHrFrxrMrDryr^ staticmethodrr'rKrrrs@rdr~r~Wss^>@)>#('+ P A*8X3 3<86 J J4  rfr~c:^\rSrSrU4SjrSrSrSrSrU=r $)ri c>[TU]U5 UR5 UR5 UR 5 gr)rrLinit_validatorscreate_page_windowsload_windows_cfgrarrs rdrLWinPage.__init__ s4      " rfcn^[R"S5mU4SjnURU5S4Ulg)N[0-9]*c*>TRU5SL$z+Return 's is blank or contains only digits'N fullmatchr8digits_or_empty_res rdis_digits_or_empty3WinPage.init_validators..is_digits_or_empty%//2$> >rf%Precompileregister digits_onlyrarrs @rdrWinPage.init_validators0ZZ 2 ?!MM*<=tErfc [R[U5S5Ul[R[ U5S5Ul[R[ U5S5Ul[R[ U5S5Ul[R[U5S5Ul [R[ U5S5Ul [R[ U5S5Ul [R[ U5S5Ul [R[U5S 5Ul [R[ U5S 5Ul[US [ S S 9n[#USS9n[%USS9n['X RSSS9Ul['X RSSS9Ul[#USS9n[%USS9n[%USS9n[-X@R SUR.SS9Ul[%USS9n[-X@R SUR.SS9Ul[#USS9n[%USS9n [5XRSSS UR.SS9Ul[%US"S9n [AUS#URS$9Ul![#USS9n [%U S%S9n [-XRS&UR.SS9Ul"[#USS9n [%U S'S9n[GXRS(S)S*S(5Ul$[#USS9n[%US+S9n[-XRS&UR.SS9Ul%[AUS,URS$9Ul&[#USS9n[%US-S9n[-UURS.UR.SS9Ul'URQ[RS/S/[T[VS09 URQ[RS/S[XS19 URQ[Z[\S/S/S29 UR*RQ[^[\S/S/S29 UR(RQ[^[\S/S/S29 URQ[RS/S[XS19 URQ[Z[\S/S/S29 UR2RQ[^[`SS/S29 URQ[^[`S/S39 UR0RQ[^[`SS/S29 URQ[^[`S/S39 URQ[RS/S[XS19 U RQ[Z[\S/S49 UR6RQ[Z[\SS49 URBRQ[^[`S5S/S29 U RQ[RS/S[XS19 U RQ[Z[\S/S/S29 URDRQ[RSS/S69 U RQ[RS/S[XS19 URQ[Z[\S/S/S29 URHRQ[RSS/S69 URQ[RS/S[XS19 URQ[Z[\S/S49 URLRQ[^[`S5S/S29 URJRQ[R[\S5S/S29 URQ[RS/S[XS19 URQ[Z[\S/S/S29 URNRQ[RSS/S69 g7![8a2 [;XRS[=[?SS 55SS!9UlGNf=f)8aReturn frame of widgets for Windows tab. Enable users to provisionally change general window options. Function load_windows_cfg initializes tk variable idleConf. Radiobuttons startup_shell_on and startup_editor_on set var startup_edit. Entry boxes win_width_int and win_height_int set var win_width and win_height. Setting var_name invokes the default callback that adds option to changes. Widgets for WinPage(Frame): > vars, bound to self frame_window: LabelFrame frame_run: Frame startup_title: Label startup_editor_on: Radiobutton > startup_edit startup_shell_on: Radiobutton > startup_edit frame_win_size: Frame win_size_title: Label win_width_title: Label win_width_int: Entry > win_width win_height_title: Label win_height_int: Entry > win_height frame_cursor: Frame indent_title: Label indent_chooser: Spinbox > indent_spaces blink_on: Checkbutton > cursor_blink frame_autocomplete: Frame auto_wait_title: Label auto_wait_int: Entry > autocomplete_wait frame_paren1: Frame paren_style_title: Label paren_style_type: OptionMenu > paren_style frame_paren2: Frame paren_time_title: Label paren_flash_time: Entry > flash_delay bell_on: Checkbutton > paren_bell frame_format: Frame format_width_title: Label format_width_int: Entry > format_width )rGeneraleditor-on-startup)rrrJ)rrrI)rIndent num-spaces)rr cursor-blink)rjr8 popupwait)rjr:rR)rjr: flash-delay)rjr:bell)rjr; max-widthrz Window Preferencesrrrz At StartuprmrzOpen Edit Windowrr@rnzOpen Shell Windowz$Initial Window Size (in characters)Widthrr textvariablerJvalidatecommandvalidateHeightzIndent spaces (4 is standard) )rfrom_torJrrreadonly )rrrwrJz Cursor Blinkz Cursor blink)rnrz%Completions Popup Wait (milliseconds)rzParen Match Style expressionopenerparensz;Time Match Displayed (milliseconds) (0 is until next input)zBell on MismatchzFormat Paragraph Max WidthrrhrrrrrrrrrrN)1r\rr startup_editr win_width win_height indent_spacesr cursor_blinkautocomplete_wait paren_style flash_delay paren_bell format_widthr"rr!r&r)startup_editor_onstartup_shell_onr%r win_width_intwin_height_intr,indent_chooserr r-rzrr$cursor_blink_bool auto_wait_intr'paren_style_typeparen_flash_timebell_onformat_width_intrr r rrrrr r)ra frame_window frame_run startup_titleframe_win_sizewin_size_titlewin_width_titlewin_height_title frame_cursor indent_titlecursor_blink_titleframe_autocompleteauto_wait_title frame_paren1paren_style_title frame_paren2paren_time_title frame_formatformat_width_titles rdrWinPage.create_page_windowssR$KKt FH $!BD!++$!CE$[[$!AC#KK4 "JL!($!L"N";;$!FH";;$!LN!++4 "FH#KK$!OQ"$Af'<> ,A6 il; !,$5$5Q'")!,$5$5Q(!*|;%KMW="^^1 $ 0 05 !h?#__A $ 0 05  \q9 \"AC  I") /A/A!$($4$4u#FD # ##qr#JSqqqA$qqqA Sr:s;DC """1"=s;4: uQRa@ ""ABQ"Gs;T!!!D """1"=O I"* /A/A$T%"+->a#ID  Is'[8[?>[?c URR[R"SSSSS95 URR[R"SSSSS95 UR R[R"SSS SS95 UR R[R"SS S SS95 URR[R"SSS SS95 URR[R"S SSSS95 URR[R"S SS55 URR[R"S SSSS95 URR[R"S SS55 URR[R"S SSSS95 g)NrrrrrDrrJintrIrrrrjr8rr:rRrrr;r) rrr0rrrrrrrrrrrs rdrWinPage.load_windows_cfgs h00 #6VE F 8--e= > H..u> ? x11,U < = h00VE F ""8#5#5nk$G H X//lG5 6 X//lMG H H..lF4 5 h00/5J Krf)rrrrrrrrrrrrrrrrrrrrrr) rrrrrLrrrrrrs@rdrr s! Fh>TKKrfrc:^\rSrSrU4SjrSrSrSrSrU=r $)ric>[TU]U5 UR5 UR5 UR 5 gr)rrLrcreate_page_shedload_shelled_cfgrs rdrLShedPage.__init__s4     rfcn^[R"S5mU4SjnURU5S4Ulg)Nrc*>TRU5SL$rrrs rdr4ShedPage.init_validators..is_digits_or_emptyrrfrrrs @rdrShedPage.init_validatorsrrfc[R[U5S5Ul[R[ U5S5Ul[R[ U5S5Ul[R[U5S5Ul[US[SS9n[US[SS9n[US S 9n[US S 9n[US URURSS9Ul[US S 9n[USS 9n[!XPR S SS9Ul[!XPR SSS9Ul[US S 9n[USS 9n['UURSS9Ul[US S 9n [U SS 9n [XRSURSS9UlUR-[.SS[0S9 [U5R-5 UR-[.SS[0S9 UR-[.SS [2S9 UR-[4[6SSS9 URR-[.SSS9 UR-[.SS [2S9 UR-[4[6SSS9 UR$R-[8[6SSS9 UR"R-[8[6SSS9 UR-[.SS [2S9 UR-[4[6SSS9 UR(R-[4SSS9 U R-[.SS [2S9 U R-[4[6SSS9 UR*R-[.SSS9 g)aReturn frame of widgets for Shell/Ed tab. Enable users to provisionally change shell and editor options. Function load_shed_cfg initializes tk variables using idleConf. Entry box auto_squeeze_min_lines_int sets auto_squeeze_min_lines_int. Setting var_name invokes the default callback that adds option to changes. Widgets for ShedPage(Frame): (*) widgets bound to self frame_shell: LabelFrame frame_auto_squeeze_min_lines: Frame auto_squeeze_min_lines_title: Label (*)auto_squeeze_min_lines_int: Entry - auto_squeeze_min_lines frame_editor: LabelFrame frame_save: Frame run_save_title: Label (*)save_ask_on: Radiobutton - autosave (*)save_auto_on: Radiobutton - autosave frame_format: Frame format_width_title: Label (*)format_width_int: Entry - format_width frame_line_numbers_default: Frame line_numbers_default_title: Label (*)line_numbers_default_bool: Checkbutton - line_numbers_default frame_context: Frame context_title: Label (*)context_int: Entry - context_lines )rPyShellauto-squeeze-min-lines)rrautosave)rrline-numbers-default)rjr9maxlinesrz Shell Preferencesrz Editor PreferencesrrzAuto-Squeeze Min. Lines:rmrr)rJrrrzAt Start of Run (F5) zPrompt to Saverrz No Promptz Show line numbers in new windows)rrJzMax Context Lines :rrrhrrrN)r\rrauto_squeeze_min_linesrrrline_numbers_default context_linesr"rr!r&r%rauto_squeeze_min_lines_intr) save_ask_on save_auto_onr$line_numbers_default_bool context_intrr rrrrr ) ra frame_shell frame_editorframe_auto_squeeze_min_linesauto_squeeze_min_lines_title frame_saverun_save_titleframe_line_numbers_defaultline_numbers_default_title frame_context context_titles rdr ShedPage.create_page_sheds0>'.kk$!N'P# t =? $+KK4 @%B!%[[$!JL!1V&:< !$Af'<> (-[a'H$',-I2L(N$*/,A!88 $ 0 05+ ' ,>a $ 0 05  c= d s>$))s)K$))tAAA)N '',,#AA,FSqqq9aaa@ E!!!D 5C"''Sqqq'I"''T!!!'L &&++AA+F!!!<QQQ? 3QQ7rfc URR[R"SSSSS95 URR[R"SSSSS S 95 UR R[R"SS S S S95 UR R[R"S SSSS95 g)Nrrrrrrrrr)rrDrrrjr9r)rrr0rrrrrs rdr ShedPage.load_shelled_cfgSs ##''(:(: #;%)I J (,, :qvG H !!%%h&8&8(>V'M N x11mZe E Frf) rrrrrrrrrr) rrrrrLrr r rrrs@rdrrs! Ff8P F FrfrcL^\rSrSrU4SjrSrSrSrSrSr Sr S r U=r $) ryi`c>[TU]U5 [RSUl[R SUlUR[5UlUR5 UR5 g)Nrj) rrLr0r/ext_defaultCfgr! ext_userCfgris_intload_extensionscreate_page_extensionsrs rdrLExtPage.__init__as^  &11,?#++L9mmF+   ##%rfcD[U5Ul[US[SS9n[ US[SS9UlUR SSS9 URSSS9 [XRSS 9Ul URRS UR5 [XRRS 9nURURl[US S S 9UlURR#SSSS9 UR#SSSS9 UR R#SSSSS/S9 UR%SS9 0UlSUlXlURUlSn[/UR05HnUR3U5 US-U-S-nM! URRU5 URR5S5 URS5 UR#SSSS9 [7U5R#SSS9 UR R#SSSS9 g)amConfigure IDLE feature extensions and help menu extensions. List the feature extensions and a configuration box for the selected extension. Help menu extensions are in a HelpFrame. This code reads the current configuration using idleConf, supplies a GUI interface to change the configuration values, and saves the changes using idleConf. Some changes may require restarting IDLE. This depends on each extension's implementation. All values are treated as text, and it is up to the user to supply reasonable values. The only exception to this are the 'enable*' options, which are boolean, and can be toggled with a True/False button. Methods: extension_selected: Handle selection from list. create_extension_frame: Hold widgets for one extension. set_extension_value: Set in userCfg['extensions']. save_all_changed_extensions: Call extension page Save(). rz Feature Extensions rz Help Menu Extensions rrrbrowse) listvariable selectmodez<>r)rJrInwsrrrlnsrr)rrrlrriNr{z} r=)rrsew)rextension_namesr"r HelpFrame frame_helpr r rextension_listrextension_selectedr*rrr details_framerwr config_framecurrent_extension outerframetabbed_page_setr*rjcreate_extension_frame selection_setr&)ra frame_extscroll ext_namesros rdr2ExtPage.create_page_extensionsis0 )t6$:< #Da$<> q+!!!A!.%i>R>R19;   !4d6M6MN9.A.A.G.GH+1::*' SI   q ? 1!D 1 qab!WMB'!%#22 t/H  ' ' 1!C(2T9I0   + ))!, % 1Qv6 d Qq) 1U;rfc $0Ul[R"SS9Hn/URU'M URGHn[URR U55nUVs/sHnUR S5(dMUPM nnUHnURU5 M XB-nUHnURRXSS9nSSS.UnSnURRXUSUS 9n[U5n U R[U55 URUR!UUUUU S .5 M GM g s snf![a& [U5nSnN![a UnS nNf=ff=f![a UnNf=f) zAFill self.extensions with data from the default and user configs.F) active_onlyenableT)raw)TrueFalserrN)rDrQr)rErDrr@var)rjr0 GetExtensionsr*r. GetOptionList startswithremover0KeyErrorrr2r/rrrappend) raroopt_listopt_nameenablesdef_strdef_objopt_typer@rTs rdr1ExtPage.load_extensionss ..5AH(*DOOH %BHd11??IJH199H"--h7 G9#)$)H$--11 26 (&*E:7CG%H$ ,,00$X4$+1-E  oE #)00(:B=D;@9< 234-%(9 (("%g,#(%(")#'( ("$#E$sH*EE E F E= E''E9 5E=8E9 9E= FFcURR5nU(aURRU5nUbX R:waXUR(aGURR SS9 UR URR5 SUlU(a>URR US9 UR URSSSS9 X lgg)z/Handle selection of an extension from the list.Nrrmrrr:) rArrrErCrrD grid_forgetrw)rarFnewsels rdrBExtPage.extension_selecteds$$113 ((,,V4F >V'='==%%""))r)2!!$"8"89EEG)-&     % %6 % 2   f % * *!6 * J%+ " rfc [URSSS9nX RU'URn[ UR U5HupE[ X5SS9nURUS[S9 USnUSS :Xa"[X7S S S S 9RUS[SS9 MVUSS:Xa.[X7SURS4SS9RUS[SS9 M[X7SS9RUS[SS9 M g)z=Create a frame holding the widgets to configure one extensionr8rHrErmrr=rTrDrrRrSr)rrrrJr)rrrlrrrrr)rrrrJr)rrJN)VerticalScrolledFramerCrDinterior enumeraterjr&rwrr$rr%r0r)rarof entry_arearoptlabelrTs rdrHExtPage.create_extension_frames !$"4"4S L&'(#ZZ !$//(";rjr@r0rFrG) rrrrrLr2r1rBrHrsrrrrs@rdryry`s.&=<~,4\ ,4@"$$rfrycX^\rSrSrU4SjrSrSrSrSrSr Sr S r S r S r U=r$) r?i#c h>[TU]"U40UD6 UR5 UR5 gr)rrLcreate_frame_help load_helplist)rarcfgrs rdrLHelpFrame.__init__%s- '3'   rfc[U5n[USS[S9Ul[ U5nURR US'UR URS'URRSUR5 [U5n[USSS URS 9Ul [US S URS 9Ul [US SS URS 9UlUR!["SS[$[&S9 URR!["[([$[&S9 UR![*[,[.S9 UR![*SS[.S9 URR![0[,SS9 URR![0[,S9 URR![0[,SS9 g)aCreate LabelFrame for additional help menu sources. load_helplist loads list user_helplist with name, position pairs and copies names to listbox helplist. Clicking a name invokes help_source selected. Clicking button_helplist_name invokes helplist_item_name, which also changes user_helplist. These functions all call set_add_delete_state. All but load call update_help_changes to rewrite changes['main']['HelpFiles']. Widgets for HelpFrame(LabelFrame): (*) widgets bound to self frame_helplist: Frame (*)helplist: ListBox scroll_helplist: Scrollbar frame_buttons: Frame (*)button_helplist_edit (*)button_helplist_add (*)button_helplist_remove rhTrrrrEditrr)rnrrJrAdd)rnrJrRemover)rrrrsrt)rrrrtrrrN)r!rr helplistr*rrrhelp_source_selectedr#helplist_item_editbutton_helplist_edithelplist_item_addbutton_helplist_addhelplist_item_removebutton_helplist_removerrr rrr rrr )raframe_helplistscroll_helplist frame_buttonss rdr|HelpFrame.create_frame_help*s*tqD %' $N3%)]]%8%8 "*9*=*= &' .0I0IJd $*F*!8!8%:!$*E!7!7$9 '-HJ!:!:'<# AAdN Qt$G%:AAA> !!&&C&B   %%3q%9 ##((c!!(Drfc$UR5 g)z+Handle event for selecting additional help.N)set_add_delete_staters rdrHelpFrame.help_source_selected\rrfcURR5S:a7URRS5 URRS5 gURR 5(a7URRS5 URRS5 gURRS5 URRS5 g)zAToggle the state for the help list buttons based on list entries.rrrN)rsizerrrrrs rdrHelpFrame.set_add_delete_state`s ==   ! #  % % + +M :  ' ' - -m <}}))++))//?++11.A))// >++11-@rfc[US5RnU(aOURRU5 URR [ US5 UR5 gg)zpHandle add button for the help list. Query for name and location of new help sources and add them to the list. zNew Help SourcerN)r6r user_helplistrZrrrupdate_help_changes)ra help_sources rdrHelpFrame.helplist_item_addmsW !'89@@     % %k 2 MM k!n 5  $ $ & rfcURR[5nURUn[ USUSUSS9R nU(anX2:wahX0RU'URR U5 URRXS5 UR5 UR5 ggg)zHandle edit button for the help list. Query with existing help source information and update config if the values are changed. zEdit Help Sourcerr)menuitemfilepathN) rr-rrr6rrzrrr)ra item_indexrnew_help_sources rdrHelpFrame.helplist_item_editys ]]((0 ((4 $($Q$Q&  =-<  z * MM  , MM Q-? @  $ $ &  % % ' >?rfcURR[5nURU URR U5 UR 5 UR 5 g)zPHandle remove button for the help list. Delete the help list item from config. N)rr-rrrzrr)rars rdrHelpFrame.helplist_item_removesP ]]((0   z * Z(   " !!#rfc 0[SS'[S[UR5S-5HFn[R SS[ U5SR URUS- SS55 MH g)z2Clear and rebuild the HelpFiles section in changesr HelpFilesr;Nr)rrrrr=rr)ranums rdrHelpFrame.update_help_changessl') $C 2 23a78C   KSHHT//A6r:; =9rfc[R"5UlURR SS5 URH&nURR [ US5 M( UR5 g)Nrr)r0GetAllExtraHelpSourcesListrrrzrrr)ra help_items rdr}HelpFrame.load_helplists[%@@B Q&++I MM il 3, !!#rf)rrrrr)rrrrrLr|rrrrrrr}rrrs@rdr?r?#s8 0Ed$ A '(( $=$$rfr?cF\rSrSrSrSrSrSr\S5r Sr Sr S r g ) VarTraceiz"Maintain Tk variables trace state.c /Ul/Ulg)zStore Tk variables and callbacks. untraced: List of tuples (var, callback) that do not have the callback attached to the Tk var. traced: List of tuples (var, callback) where that callback has been attached to the var. N)untracedtracedrs rdrLVarTrace.__init__s  rfclURR5 URR5 g)zClear lists (for tests).N)rrrrs rdrVarTrace.clears$  rfc[U[5(aURX5nURR X45 U$)aAdd (var, callback) tuple to untraced list. Args: var: Tk variable instance. callback: Either function name to be used as a callback or a tuple with IdleConf config-type, section, and option names used in the default callback. Return: Tk variable instance. ) isinstancetuple make_callbackrrZrarTcallbacks rdr VarTrace.adds: h & &))#8H c_- rfc^^UU4SjnU$)zCReturn default callback function to add values to changes instance.cR>[R"/TQTR5P76 g)z&Add config values to changes instance.N)rr=r)r?rrTs rddefault_callback0VarTrace.make_callback..default_callbacks    2 2 2rfro)rTrrs`` rdrVarTrace.make_callbacks 3 rfcUR(a^URR5upURSU5 URR X45 UR(aM]gg)z0Attach callback to all vars that are not traced.writeN)rpop trace_addrrZrs rdr]VarTrace.attachsJmm MM--/MC MM'8 , KK   /mmmrfc UR(arURR5upURSUR5SS5 URR X45 UR(aMqgg)z!Remove callback from traced vars.rrrN)rr trace_remove trace_inforrZrs rddetachVarTrace.detachs[kk KKOO-MC   Wcnn&6q&9!&< = MM # 1kkkrf)rrN) rrrrrrLrrrrr]rrrorfrdrrs2,  "  02rfra7When you click either the Apply or Ok buttons, settings in this dialog that are different from IDLE's default are saved in a .idlerc directory in your home directory. Except as noted, these changes apply to all versions of IDLE installed on this machine. [Cancel] only cancels changes made since the last save. u Font sample: This shows what a selection of Basic Multilingual Plane unicode characters look like for the current font selection. If the selected font does not define a character, Tk attempts to find another font that does. Substitute glyphs depend on what is available on a particular system and will not necessarily have the same size as the font selected. Line contains 20 characters up to Devanagari, 14 for Tamil, and 10 for East Asia. Hebrew and Arabic letters should display right to left, starting with alef, א and ا. Arabic digits display left to right. The Devanagari and Tamil lines start with digits. The East Asian lines are Chinese digits, Chinese Hanzi, Korean Hangul, and Japanese Hiragana and Katakana. You can edit the font sample. Changes remain until IDLE is closed. z Highlighting: The IDLE Dark color theme is new in October 2015. It can only be used with older IDLE releases if it is saved as a custom theme, with a different name. z Keys: The IDLE Modern Unix key set is new in June 2016. It can only be used with older IDLE releases if it is saved as a custom key set, with a different name. a_ General: AutoComplete: Popupwait is milliseconds to wait after key char, without cursor movement, before popping up completion box. Key char is '.' after identifier or a '/' (or '\' on Windows) within a string. FormatParagraph: Max-width is max chars in lines after re-formatting. Use with paragraphs in both strings and comment blocks. ParenMatch: Style indicates what is highlighted when closer is entered: 'opener' - opener '({[' corresponding to closer; 'parens' - both chars; 'expression' (default) - also everything in between. Flash-delay is how long to highlight if cursor is not moved (0 means forever). CodeContext: Maxlines is the maximum number of code context lines to display when Code Context is turned on for an editor window. Shell Preferences: Auto-Squeeze Min. Lines is the minimum number of lines of output to automatically "squeeze". a ZzDummy: This extension is provided as an example for how to create and use an extension. Enable indicates whether the extension is active or not; likewise enable_editor and enable_shell indicate which windows it will be active on. For this extension, z-text is the text that will be inserted at or removed from the beginning of the lines of selected text, or the current line if no selection. )z Fonts/TabsrorYrrpcLU(dg[U5 g![a gf=f)z(Return 's is blank or represents an int'TF)rr2)r8s rdr0r0- s)  A s  ##c\rSrSrSrSrSrg)rhi8 zA pure Tkinter vertically scrollable frame. * Use the 'interior' attribute to place widgets inside the scrollable frame * Construct and pack/place/grid normally * This frame only allows vertical scrolling c(^^^ [R"X/UQ70UD6 [U[S9nUR [ [ [S9 [USSURSS9mTR [[[S9 URTRS9 TRS5 TR!S5 [T5=UlmTR%SST[&S9m UU4S jnTR)S U5 UUU 4S jnTR)S U5 g) Nr9)rtrrrsr)rrlrrJr>r)windowrcj>TR5TR54nTRSU-S9 g)Nz 0 0 %s %s) scrollregion)winfo_reqwidthwinfo_reqheightr)rFrcanvasris rd_configure_interior;VerticalScrolledFrame.__init__.._configure_interiorT s2++-x/G/G/IJD MM{T'9M :rfz c>TR5TR5:waTRTTR5S9 gg)N)rJ)r winfo_width itemconfigure)rFrri interior_ids rd_configure_canvas9VerticalScrolledFrame.__init__.._configure_canvasZ s?&&(F,>,>,@@$$[8J8J8L$MArf)r!rLr*rrrr r rrrrr rr xview_moveto yview_movetori create_windowrr) rarMrkw vscrollbarrrrrirs @@@rdrLVerticalScrolledFrame.__init__? s t1d1b1tH5 QU59!'1~~SB D 6&,,/ AA$)=0 **1a*L  ;  m%89 N  M#45rf)riN)rrrrrrLrrorfrdrhrh8 s  !rfrh__main__)rz#idlelib.idle_test.test_configdialogrF) verbosityexit)run)crrtkinterrrrrrrr r r r r rrrrrrrrrrrrrrrrrrr tkinter.ttkr!r"r#r$r%r&r'r(r)r*r+r,r-r. tkinter.fontr7r+r/idlelib.configr0r1idlelib.config_keyr2idlelib.dynoptionr3idlelibr4 idlelib.queryr5r6idlelib.textviewr7idlelib.autocompleter8idlelib.codecontextr9idlelib.parenmatchr:idlelib.formatr;idlelib.squeezerr<r=rrr?rr}r{r~rrryr?rr\rrr0rhrunittestridlelib.idle_test.htestrrorfrdrs  JJJJJJJJ ,,,,!2,+1&-+)*%0 /[*o {8{^E