a  ze @sddlZddlmZmZmZmZmZmZmZm Z m Z m Z m Z m Z mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z ddl!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.ddlm/Z/ddl0m1Z2ddlm3Z3ddl4m5Z5m6Z6ddl7m8Z8ddl9m:Z:dd l;mZ>m?Z?dd l@mAZAdd lBmCZCdd lDmEZEddlFmGZGddlHmIZIddlJmKZKddl@mLZLe6ZMeCeEeGeIeKfZNGdddeZOdaPGddde"ZQGddde"ZRGddde"ZSGddde"ZTGddde"ZUGdd d e"ZVGd!d"d"e#ZWGd#d$d$ZXeXZYd%ZZd&d'd(d)d*d+Z[d,d-Z\Gd.d/d/e"Z]e^d0krdd1l_m`Z`e`d2d3d4d5dd6lambZbebeOdS)7N)ToplevelListboxScaleCanvas StringVar BooleanVarIntVarTRUEFALSETOPBOTTOMRIGHTLEFTSOLIDGROOVENONEBOTHXYWEEWNSNSEWNW HORIZONTALVERTICALANCHORACTIVEENDTclError) Frame LabelFrameButton CheckbuttonEntryLabel OptionMenuNotebook Radiobutton ScrollbarStyleSpinboxCombobox) colorchooser) messagebox)idleConf ConfigChanges) GetKeysDialog) DynOptionMenu)macosx) SectionName HelpSource) view_text) AutoComplete) CodeContext) ParenMatch)FormatParagraph)Squeezer)ScrollableTextFramecsneZdZddddddZddZdd Zd d Zd d ZddZfddZ ddZ ddZ ddZ Z S) ConfigDialogF)_htest_utestcCst||||_|ri|_|s(|||p2d|d}||sPdnd}|d|d|| |j t t d| || d|j|jjt|s|||dS)NzIDLE Preferences+heightwidthZWM_DELETE_WINDOW)r__init__parent instance_dictZwithdrawtitleZ winfo_rootxZ winfo_rootyZgeometrycreate_widgetsZ resizabler Z transientprotocolcancelfontpagefontlistZ focus_settracersattachZgrab_setZ wm_deiconifyZ wait_window)selfrJrLr@rAxyrWH/opt/bitninja-python-dojo/embedded/lib/python3.9/idlelib/configdialog.pyrI1s(    zConfigDialog.__init__cCst|dd|_}|jjddt||_}t||_t||j|_t ||j|_ t ||j|_ t ||_t||_|j|j dd|j|jdd|j|j dd|j|jd d|j|jd d|j|jd d||jtttd |jtd dS)NZ5pxpaddingZnwes)sticky Fonts/Tabstext Highlightsz Keys z Windows z Shell/Ed Extensionssideexpandfillrb)r!framegridr(noteExtPageextpageHighPagehighpageFontPagerPKeysPageZkeyspageWinPageZwinpageShedPageZshedpageaddZenable_traversalpackr r rcreate_action_buttonsr )rTrfrhrWrWrXrM`s$   zConfigDialog.create_widgetscCstri}nddi}t|jdd}t|dd}i|_d|jfd|jfd|jfd|jffD]:\}}t |f||t d ||j|<|j|j t d d qZt|dd d j t d|j td|S)NrZ)rYZOkZApplyZCancelZHelp)r^command takefocus)rbpadxr)rG borderwidthre)r4ZisAquaTkr!rfZbuttonsokapplyrOhelpr#r rrrr r )rTZ padding_argsZouterZ buttons_frameZtxtcmdrWrWrXrss(     z"ConfigDialog.create_action_buttonscCs||dSN)r}destroyrTrWrWrXr|szConfigDialog.okcCs&|t|j|dSr)deactivate_current_configchangessave_allrjsave_all_changed_extensionsactivate_config_changesrrWrWrXr}s zConfigDialog.applycCst|dSr)rclearrrrWrWrXrOszConfigDialog.cancelcs&|jjdda|tdS)N1.0end)rP font_samplegetfont_sample_textZ grab_releasesuperrr __class__rWrXrszConfigDialog.destroycCs8|jj|jdd}t|dtt|dddS)Nr^)optionzHelp for IDLE preferencesr?)rLcontents)rhZtabselectstripr7 help_common help_pagesr)rTZpagerWrWrXr~szConfigDialog.helpcCs"|jj}|D] }|qdSr)rJrKkeysZRemoveKeybindings)rT win_instancesinstancerWrWrXrs z&ConfigDialog.deactivate_current_configcCs\|jj}|D]4}||||||qt D] }| qJdSr) rJrKrZResetColorizerZ ResetFontZset_notabs_indentwidthZApplyKeybindingsZreset_help_menu_entriesZupdate_cursor_blink reloadablesreload)rTrrklassrWrWrXrs  z$ConfigDialog.activate_config_changes)r?)__name__ __module__ __qualname__rIrMrsr|r}rOrr~rr __classcell__rWrWrrXr>-s/&(   r>u^ AaBbCcDdEeFfGgHhIiJj 1234567890#:+=(){}[] ¢£¥§©«®¶½ĞÀÁÂÃÄÅÇÐØß ɐɕɘɞɟɤɫɮɰɷɻʁʃʆʎʞʢʫʭʯ ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκ БбДдЖжПпФфЧчЪъЭэѠѤѬӜ אבגדהוזחטיךכלםמןנסעף ابجدهوزحطي٠١٢٣٤٥٦٧٨٩ ०१२३४५६७८९अआइईउऊएऐओऔ ௦௧௨௩௪௫௬௭௮௯அஇஉஎ 〇一二三四五六七八九 汉字漢字人木火土金水 가냐더려모뵤수유즈치 あいうえおアイウエオ csFeZdZfddZddZddZddZd d Zdd d ZZ S)rmcs(t||j|_||dSr)rrIhighlight_samplecreate_page_font load_font_cfg)rTmasterrlrrWrXrI"s zFontPage.__init__c Cstt||j|_tt||j|_tt||j|_t|dt dd}t|dt dd}t |}t |}t |t dd}t |ddtd |_|jd |j|jd |j|jd |jt|}|j|jjd |jj|jdt |dd}t||jd|_t||jdddd|_t|}|j|_|jjtddd|jtt |j!ddd|j"ddd|j#ddddd|j#ddddddd|j$t%ddt&d|j$t%ddt&d|j$t%t'd|jj$t t(t&d|j$t t)d|j$t t'd|jj$t t'd|jj$t t'd d!|j$t(t*d"dS)#Nrvz Shell/Editor Font r{reliefr^z Font Sample (Editable) z Font Face :)Zjustifyr^TrGrxexportselectionzzrw)yscrollcommandzSize :r]rZBold)variableonvalueoffvaluer^)wraprHrGZweightry)rowcolumnrzpadyrunsew)rrZrowspanrzrr[rbrzrrdrbanchorra)rbrdrBrbrrz)rcrd)+rRrqrvar_changed_font font_name font_sizer font_boldr"rr!r&rrr rQbindon_fontlist_selectr*configyviewsetr3sizelistr$Z bold_toggler=r^rrinsertrrcolumnconfigure rowconfigurergrrr rrr rr) rTZ frame_fontZ frame_sampleZframe_font_nameZframe_font_paramZfont_name_titleZ scroll_fontZfont_size_titleZfont_sample_framerWrWrXr(s`& zFontPage.create_page_fontc Cst|dd}|d}|d}|ddk}ttt|}|D]}|jt |qD|j |dd|D}z>| |}|j ||j ||j||j|WntyYn0|jd ||j||dS) Nmain EditorWindowrrrvZboldcSsg|] }|qSrW)lower).0srWrWrX z*FontPage.load_font_cfg..)789101112131416Z18Z20Z22Z25Z29Z34Z40)r0ZGetFontrsortedrtkfontfamiliesrQrrrindexsee select_set select_anchorZactivate ValueErrorrSetMenur set_samples) rTZconfigured_fontrrrZfontsfontZlc_fontsZcurrent_font_indexrWrWrXrs,         zFontPage.load_font_cfgcGsZ|j}tddd||j}tddd||j}tddd||dS)Nrrrz font-sizez font-bold)rrr add_optionrrrrTparamsvaluerWrWrXrs   zFontPage.var_changed_fontcCs0|j|jjdkrtnt}|j|dS)NZ KeyRelease) rQrtypenamerrrrr)rTeventrrWrWrXrszFontPage.on_fontlist_selectNcCsH|j}|jrtjntj}||j|f}||jd<||jd<dS)Nr) rrrrZBOLDZNORMALrrr)rTrrZ font_weightZnew_fontrWrWrXrs   zFontPage.set_samples)N) rrrrIrrrrrrrWrWrrXrm s  Y" rmcseZdZfddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*ZZS)+rkcs:t|||_||_t||_||dSr) rrIrjwinfo_toplevelcdr+stylecreate_page_highlightload_theme_cfgrTrrjrrWrXrIs    zHighPage.__init__cs&ddddddddd d d d d dddd_ttj_ttj_t_ ttj _ ttj _ ttj_tdtdd}tdtdd}t|tdd}|j}_|jddddtdtd|ddd|dd dd!}|D]\}}|t||qt|d"t}td|D]0} || d#| tt |d$d%d&qHjD].} | ffd'd( } |!j| dd)| qd*|d+<j"jd,dd-d.t#|d,d/_$t#|} t%j$d0j&d1_'t(j$jddd2_)t*| j dd3j+d4_,t*| j dd5j+d4_-j .dt%|d6j/d1_0t1|d7d8} t*|j dj2d9d:_3t*|j dj2d;d:_4t(|jddd<_5t(|jddd<_6t%|d=j7d1_8t1|dd>_9|j:t;d?d?td?d?t?dAj$j:t>d?d?t?dA| j:t>d?ddB|j:t>d?d?ttttBd?d?dIj3j:t>tBd?dJj4j:t>tBd?ddIj5j:t>t?d?d?dHj6j:t>t?tBd?d?dKj8j:t>t?d?d?dHj9j:t>t?d?dLdS)MN)normalZ00)contextZ01)keywordZ02) definitionZ03)builtinZ04)commentZ05)stringZ06)hiliteZ07)hitZ08)cursorZ09)breakr)consoler)errorr)stdoutr)stderrr) linenumberr)zNormal Code or Textz Code ContextzPython KeywordszPython DefinitionszPython BuiltinszPython CommentszPython Stringsz Selected Textz Found TextCursorzEditor Breakpointz Shell Promptz Error TextzShell User OutputzShell User Exceptionz Line Numberrvz Custom Highlighting rz Highlighting Theme r)rr{)Zcourier r?Zhand2r)rrrHrGrxhighlightthicknessrzcSsdSNrrWerWrWrXurz0HighPage.create_page_highlight..z cSsdSrrWrrWrWrXrvr)")z# Click selects item.r r)zcode context sectionrr)z| cursorrr)defr) r)funcr)z (param): r)z"Return None."r)z var0 = r)z'string'r)z var1 = r)z 'selected'r)z var2 = r)z'found'r)z var3 = r)listr)(r)Noner)z) r)z breakpoint("line")r)z rz>>>r)z 3.14**2 r)z9.8596rrr)z pri r)nr)zt( r) SyntaxErrorrrrz.0dr rcsj|dSr)highlight_targetr)relemrrWrXtemsz+HighPage.create_page_highlight..temzdisabledstateframe_color_set.TFrameZsolid)r{r)rzChoose Color for :r^rw)rZ Foreground)rrr^rwZ BackgroundzSave as New Custom Themez Select : r]za Built-in Themerrrwr^za Custom ThemerzDelete Custom Themer{ryrbrzrrcrdrrbrzr)rbrcrdrzrrurrbrdrzrrbrrzrr)rbrdrrzr)rbrdr)Dtheme_elementsrRrqrvar_changed_builtin_name builtin_namevar_changed_custom_name custom_namer fg_bg_togglevar_changed_colorcolorvar_changed_theme_source theme_sourcevar_changed_highlight_targetrr"rr=rr^r configurer rrrrlenr splitlinesrangestrZtag_bindrr!frame_color_setr# get_colorZbutton_set_colorr3 targetlistr)set_color_sample_bindingfg_onbg_onrsave_as_new_themeZbutton_save_customr&set_theme_typeZbuiltin_theme_oncustom_theme_on builtinlist customlist delete_custombutton_delete_custom theme_messagerrrr rr rrr rr )rT frame_customZ frame_themeZ sample_framer^Z string_tagsrtagZn_lineslinenoelementrZframe_fg_bg_toggleZtheme_type_titlerWrrXrsv                 zHighPage.create_page_highlightc s.jtjddddddt}jrtdd}|j ||tdd}||sj d j d qވj ||d nHtdd}|j ||tdd}|j ||d tj}|jfd d dj ||d dS)NrThemedefaultboolrrrE highlightuserr- no custom themes -rcsj|dS)Nr)r")rUrrWrXrrz)HighPage.load_theme_cfg..)key)r+rr0 GetOptionZ CurrentThemerGetSectionListsortr;rr:rr&r<r9r r"rr4paint_theme_sampleset_highlight_target)rTcurrent_option item_listZ theme_namesrWrrXrs4        zHighPage.load_theme_cfgcGsd}|j}||vrXtddd|vrrr:rrWrWrXr99s      zHighPage.set_theme_typecCs|j}|j|jdd}tj|d||d\}}|r||kr|jrzd}||}|sbdS| ||j |n |j |dS)Nr backgroundzPick new color for : )rJrLZ initialcolorz_Your changes will be saved as a new Custom Theme. Enter a name for your new Custom Theme below.) rrrlookupr2r.Zaskcolorr+get_new_theme_name create_newr)r)rTtargetZ prev_colorZ rgbTupletZ color_stringmessage new_themerWrWrXr3Us"      zHighPage.get_colorcCs|j}|jjd|d|jr(dnd}|j|jd}|jj|fi||i|j }|d|}t d|||dS)NrrY foregroundrYr-rH) r)rrr-r'r"rr tag_configr&rr)rTZ new_colorplaneZsample_elementthemeZ theme_elementrWrWrXrU{s   zHighPage.on_new_color_setcCs,tddtdd}t|d||j}|S)NrIrHrEzNew Custom Themer0rNr5result)rTr^ used_namesr_rWrWrXr[s  zHighPage.get_new_theme_namecCs|d}|r||dS)NzNew Theme Name:)r[r\)rTnew_theme_namerWrWrXr8s zHighPage.save_as_new_themecCs|jrd}|j}nd}|j}t||}|tdvrbtd|}|D]}||||<qP|||tdd}| |j |||j d| dS)NrErIrHr)r+rr$r&r0Z GetThemeDictrsave_newrNrOr<rrr9)rTriZ theme_type theme_namer_Z theme_changesrCZcustom_theme_listrWrWrXr\s          zHighPage.create_newcCsd|jdkr4|jd|jd|jdn$|jd|jd|jd|dS)NrrJrrX)rrr6rr7r'rset_color_samplerrWrWrXrQs     zHighPage.set_highlight_targetcGs |dSr)rl)rTargsrWrWrXr5sz!HighPage.set_color_sample_bindingcCsH|j|jd}|jr"dnd}|j||}|jjd|ddS)NrrarYrr`)r"rrr'rZtag_cgetrr-)rTrArdr)rWrWrXrls zHighPage.set_color_samplecCs|jr|j}n |j}|jD]}|j|d}t||}|dkr`t|dd|d<|tdvrtd|}|d|vr||d|d<|d|vr||d|d<|jj |fi|q&| dS) NrrrrYrHz -foregroundraz -background) r+rr$r&r"r0Z GetHighlightrrrcrl)rTreZ element_titlerCZcolorsZ theme_dictrWrWrXrPs(         zHighPage.paint_theme_samplecCs:tjd||D] }||}tjd|||qdS)NrHr0userCfgZ AddSection SetOption)rTrkrerCrrWrWrXrjszHighPage.save_newcOstj|i|Srr/askyesnorTrmkwargsrWrWrXrr*szHighPage.askyesnocCs|j}d}|jd|||ds&dS|jtd|tdd}| |sp|j d|j |dn|j ||d|jtjd d d |jtjd d d t|j|j|dS) Nz.Are you sure you wish to delete the theme %r ?z Delete ThemerJrHrIrJrKrrrDrEr)r&rrrrrrdelete_sectionr0rNrOr:rr<rr+r defaultCfgGetr$rrjrrr9)rTrkdelmsgrSrWrWrXr=.s(        zHighPage.delete_custom)rrrrIrrr#r%r*r(r,r9r3rUr[r8r\rQr5rlrPrjrrr=rrWrWrrXrks. 4  &  (( rkcseZdZfddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZeddZdd Zd!d"ZZS)#rncs0t|||_||_||dSr)rrIrjrrcreate_page_keys load_key_cfgrrrWrXrI`s   zKeysPage.__init__cs"tt||j|_tt||j|_tt||j|_ tt||j |_ t |dt dd}t |dt ddt|}t|dd}t|}t|td}t|ttd|_|jd |j|jj|d <|jj|d <|j|jd <|j|jd <t|d |jdd|_fddtdD}t|d|j d|jdd|_ t|d|j d|jdd|_!t"|d|jddd|_#t"|d|jddd|_$t|dd|j%d|_&t|dd|j'd|_(t|ddd|_)|j*t+ddt,t-dj*t+ddt-d|jj*t+t.ddd|j*t/ddt,t-d|j0ddd |j1ddd |j2dddt3d!|jj2ddt4d"|j2ddt5d"|j2ddt6d"|j j2ddt3t5d"|j!j2ddt3t5d"|j#j2ddt4d"|j$j2ddt4d"|j)j2ddt4ddd#|j&j*t/t.d$dd%|j(j*t/t.d$dd%|dj*t7t-d$d&|dj*t7t.d$dd'dS)(Nrvz Custom Key Bindings rz Key Set zAction - Key(s)r]Zorient)rxrrrwrZxscrollcommandzGet New Keys for Selectionr)r^rwrcsg|]}tdddqS)rvr)rZr{)r!)riZframe_key_setsrWrXrsz-KeysPage.create_page_keys..rrzUse a Built-in Key SetrzUse a Custom Key SetrzDelete Custom Key SetrzSave as New Custom Key Setrryrrr r)rrZ columnspanr[rrr[)rrr[rzrT)rbrdrcrzrbrdrc)rbrdrcr)8rRrqrr#r$r%r&rvar_changed_keyset_source keyset_sourcevar_changed_keybinding keybindingr"rr!r&r*rrr bindingslistron_bindingslist_selectrZxviewrr# get_new_keysbutton_new_keysr0r) set_keys_typeZbuiltin_keyset_oncustom_keyset_onr3r;r<delete_custom_keysbutton_delete_custom_keyssave_as_new_key_setZbutton_save_custom_keys keys_messagerrr r rrrrrrgrrrrr )rTr@Z frame_targetZ target_titleZscroll_target_yZscroll_target_xZframesrWr~rXrzgsR             zKeysPage.create_page_keysc Cs|jtjddddddt}|jrtdd}||j ||tdd}||s|j d |j d q|j ||d nHtdd}||j ||tdd}||j |t|t}||dS) NrKeysrErFrrGrrIrJ- no custom keys -r)rrr0rMZ CurrentKeysrrNrOr;rrrr&r< default_keysrload_keys_list)rTrRrS keyset_namerWrWrXr{s.        zKeysPage.load_key_cfgcGsd}|j}||vrXtddd|vr                  zKeysPage.get_new_keyscCs,tddtdd}t|d||j}|S)NrIrrEzNew Custom Key Setrf)rTr^rhrrWrWrXrs  zKeysPage.get_new_keys_namecCs|d}|r||dS)NzNew Key Set Name:)rr)rTZ new_keys_namerWrWrXrs zKeysPage.save_as_new_key_setcCs|jddS)NrX)rrrTrrWrWrXrszKeysPage.on_bindingslist_selectc Cs|jr|j}n |j}t|}i}|D]&}|dd}d||}|||<q2|tdvrtd|}|D]}||||<qv|||t dd} | |j | ||j d|dS)Nrvr rrIr)rrr$r&r0Z GetCoreKeysjoinrsave_new_key_setrNrOr<rrr) rTZnew_key_set_nameZprev_key_set_nameZ prev_keysrrZ event_namerrZcustom_key_listrWrWrXrs&           zKeysPage.create_new_key_setcCsd}|jrd}|jt}t|}t|}||j dt |D]`}d ||}|dd}|t dvr|t d|vrt d||}|j t |d|qN|r|j||j||j|dS) NFTrr rvrrr)r curselectionrrr0Z GetKeySetr rrOrrrrrrrr)rTrZreselectrkeysetZ bind_namesrrLrWrWrXrs&        zKeysPage.load_keys_listcCs:tjd||D] }||}tjd|||qdS)Nrrn)rrrrrWrWrXrs zKeysPage.save_new_key_setcOstj|i|SrrqrsrWrWrXrrszKeysPage.askyesnocCs|j}d}|jd|||ds&dS|jtd|tdd}| |sp|j d|j |dn|j ||d|jtjd d d |jtjd d d ptt|j|j|dS) Nz0Are you sure you wish to delete the key set %r ?zDelete Key SetrurrIrJrrrrrEr)r&rrrrrrrvr0rNrOrrr<rrrrwrxr$rrrjrrr)rTrryrSrWrWrXrs0        zKeysPage.delete_custom_keys)rrrrIrzr{r#r%rrrrrrrrr staticmethodrrrrrrWrWrrXrn^s& !   , rncs4eZdZfddZddZddZddZZS) rocs(t||||dSr)rrIinit_validatorscreate_page_windowsload_windows_cfgrTrrrWrXrIs zWinPage.__init__cs*tdfdd}||df|_dS)N[0-9]*cs|duSr fullmatchrZdigits_or_empty_rerWrXis_digits_or_emptysz3WinPage.init_validators..is_digits_or_empty%Precompileregister digits_onlyrTrrWrrXrs  zWinPage.init_validatorsc Cstt|d|_tt|d|_tt|d|_tt|d|_tt|d|_ tt|d|_ tt|d|_ tt|d|_ tt|d |_ tt|d |_t|d td d }t|dd}t|dd}t||jddd|_t||jddd|_t|dd}t|dd}t|dd}t||jd|jdd|_t|dd}t||jd|jdd|_t|dd}t|dd} z t||jddd |jdd|_Wn4tyt||jdttdd dd!|_Yn0t|d"d} t |d#|j d$|_!t|dd} t| d%d} t| |j d&|jdd|_"t|dd} t| d'd}t#| |j d(d)d*d(|_$t|dd}t|d+d}t||j d&|jdd|_%t |d,|j d$|_&t|dd}t|d-d}t||jd.|jdd|_'|j(t)d/d/t*t+d0|j(t)d/dt,d1|j(t-t.d/d/d2|jj(t/t.d/d/d2|jj(t/t.d/d/d2|j(t)d/dt,d1|j(t-t.d/d/d2|jj(t/t0dd/d2|j(t/t0d/d3|jj(t/t0dd/d2|j(t/t0d/d3|j(t)d/dt,d1| j(t-t.d/d4|jj(t-t.dd4|j!j(t/t0d5d/d2| j(t)d/dt,d1| j(t-t.d/d/d2|j"j(t)dd/d6| j(t)d/dt,d1|j(t-t.d/d/d2|j$j(t)dd/d6|j(t)d/dt,d1|j(t-t.d/d4|j&j(t/t0d5d/d2|j%j(t)t.d5d/d2|j(t)d/dt,d1|j(t-t.d/d/d2|j'j(t)dd/d6dS)7N)rGeneraleditor-on-startup)rrrH)rrrG)rIndent num-spaces)rr cursor-blink)rr8 popupwait)rr:r)rr: flash-delay)rr:bell)rr; max-widthrvz Window Preferencesrrrz At Startupr]rzOpen Edit Windowrrr^zOpen Shell Windowz$Initial Window Size (in characters)ZWidthrurL textvariablerHvalidatecommandvalidateZHeightzIndent spaces (4 is standard) )rZfrom_torHrrreadonly )rrrrHz Cursor Blinkz Cursor blink)r^rz%Completions Popup Wait (milliseconds)rtzParen Match StyleZ expressionopenerZparensz;Time Match Displayed (milliseconds) (0 is until next input)zBell on MismatchzFormat Paragraph Max Widthrryrrr!rbrrrrr)1rRrqr startup_editr win_width win_height indent_spacesr cursor_blinkautocomplete_wait paren_style flash_delay paren_bell format_widthr"rr!r&r)Zstartup_editor_onZstartup_shell_onr%rZ win_width_intZwin_height_intr,Zindent_chooserr r-r r0r$Zcursor_blink_boolZ auto_wait_intr'Zparen_style_typeZparen_flash_timeZbell_onZformat_width_intrrr r rrrrr r)rTZ frame_windowZ frame_runZ startup_titleZframe_win_sizeZwin_size_titleZwin_width_titleZwin_height_titleZ frame_cursorZ indent_titleZcursor_blink_titleZframe_autocompleteZauto_wait_titleZ frame_paren1Zparen_style_titleZ frame_paren2Zparen_time_titleZ frame_formatZformat_width_titlerWrWrXrs)             zWinPage.create_page_windowscCs|jtjddddd|jtjddddd|jtjddd dd|jtjdd d dd|jtjddd dd|jtjd dddd|j td dd|j tjd dddd|j td dd|j tjd dddddS)NrrrrFrrrHintrGrrrrr8rr:rrrr;r) rrr0rMrrrrrrrrrrrWrWrXrs<          zWinPage.load_windows_cfg)rrrrIrrrrrWrWrrXros  +rocs4eZdZfddZddZddZddZZS) rpcs(t||||dSr)rrIrcreate_page_shedload_shelled_cfgrrrWrXrIs zShedPage.__init__cs*tdfdd}||df|_dS)Nrcs|duSrrrrrWrXrsz4ShedPage.init_validators..is_digits_or_emptyrrrrWrrXrs  zShedPage.init_validatorsc CsTtt|d|_tt|d|_tt|d|_tt|d|_t |dt dd}t |dt dd}t |d d }t |d d }t |d |j|jdd|_t |d d }t |dd }t||jd dd|_t||jddd|_t |d d }t |dd }t||jdd|_t |d d } t | dd } t | |jd|jdd|_|jtddtdt ||jtddtd|jtdd td|jttddd|jjtddd|jtdd td|jttddd|jjttddd|jjttddd|jtdd td|jttddd|jjtddd| jtdd td| jttddd|jjtddddS)N)rPyShellauto-squeeze-min-lines)rrautosave)rrline-numbers-default)rr9maxlinesrvz Shell Preferencesrz Editor PreferencesrrzAuto-Squeeze Min. Lines:r]rrL)rHrrrzAt Start of Run (F5) zPrompt to Saverrz No Promptz Show line numbers in new windows)rrHzMax Context Lines :rurryrr!r)rRrqrauto_squeeze_min_linesrrrline_numbers_default context_linesr"rr!r&r%rZauto_squeeze_min_lines_intr)Z save_ask_onZ save_auto_onr$Zline_numbers_default_boolZ context_intrrr rrrrr ) rTZ frame_shellZ frame_editorZframe_auto_squeeze_min_linesZauto_squeeze_min_lines_titleZ frame_saveZrun_save_titleZframe_line_numbers_defaultZline_numbers_default_titleZ frame_contextZ context_titlerWrWrXrs       zShedPage.create_page_shedc Csn|jtjddddd|jtjddddd d |jtjdd d d d|jtjd dddddS)NrrrrrrrrrF)rErrrrr9r)rrr0rMrrrrrWrWrXrYs     zShedPage.load_shelled_cfg)rrrrIrrrrrWrWrrXrps hrpcsLeZdZfddZddZddZddZd d Zd d Zd dZ Z S)ricsDt|tjd|_tjd|_|t|_| | dS)Nr) rrIr0rwext_defaultCfgro ext_userCfgris_intload_extensionscreate_page_extensionsrrrWrXrIgs     zExtPage.__init__cCs~t||_t|dtdd}t|dtdd|_|jddd|jdddt||jdd |_ |j d |j t ||j j d }|j|j _t|d d d |_|j jdddd|jdddd|jjdddddgd|jddi|_d|_||_|j |_d}t|jD] }|||d|d}q|j||j d| d|jddddt|jddd|jjdddddS)Nrvz Feature Extensions rz Help Menu Extensions rrrZbrowse)Z listvariableZ selectmodez<>r)rHrGZnwsrrr[nsrr)rrr[rzrYr?{z} r)rrZsew)rZextension_namesr"r HelpFrameZ frame_helprrrextension_listrextension_selectedr*rrr details_framergr- config_framecurrent_extensionZ outerframeZtabbed_page_setrrcreate_extension_frameZ selection_setr&)rTZ frame_extZscrollZ ext_namesrrWrWrXrosD       zExtPage.create_page_extensionsc CsFi|_tjddD]}g|j|<q|jD]}t|j|}dd|D}|D]}||qP||}|D]}|jj||dd}zddd|}d}Wn>tyzt |}d }Wnt y|}d}Yn0Yn0z|j j|||d|d }Wnt y |}Yn0t |} | t||j|||||| d qlq(dS) NF)Z active_onlycSsg|]}|dr|qS)enable) startswith)ropt_namerWrWrXrs z+ExtPage.load_extensions..T)raw)TrueFalserFr)rrrE)rrrErvar)rr0Z GetExtensionsrrZ GetOptionListremoverxKeyErrorrrrrrr1append) rTrZopt_listZenablesrZdef_strZdef_objZopt_typerrrWrWrXrsL        zExtPage.load_extensionscCs|j}|r|j|}|dus,||jkrV|jrV|jjdd|j|jd|_|r|jj|d|j|jdddd||_dS)Nr?r]rrr) rrrrrrrZ grid_forgetrg)rTrZnewselrWrWrXrs  zExtPage.extension_selectedcCst|jddd}||j|<|j}t|j|D]\}}t||dd}|j|dtd|d}|dd krt ||d d d d j|dt ddq.|ddkrt ||d|j dfddj|dt ddq.t ||ddj|dt ddq.dS)NrrFrr]rrrrrFrrr)rrrrHr)rrr[rzrrLrr)rrrrHr)rrH)VerticalScrolledFramerrinterior enumeraterr&rgrr$rr%rr)rTrfZ entry_arearoptZlabelrrWrWrXrs.    zExtPage.create_extension_framecCsX|d}|d}|dp"|}|d|||krH|j||S|j|||S)NrrEr)rrrrZ RemoveOptionrp)rTsectionrrrErrWrWrXset_extension_valueszExtPage.set_extension_valuecCsFd}|jD](}|j|}|D]}|||rd}qq |rB|jdS)NFT)rrrZSave)rTZ has_changesroptionsrrWrWrXrs    z#ExtPage.save_all_changed_extensions) rrrrIrrrrrrrrWrWrrXrifs ?.rics\eZdZfddZddZddZddZd d Zd d Zd dZ ddZ ddZ Z S)rc s(tj|fi|||dSr)rrIcreate_frame_help load_helplist)rTrZcfgrrWrXrI+szHelpFrame.__init__cCst|}t|ddtd|_t|}|jj|d<|j|jd<|jd|jt|}t |ddd |j d |_ t |d d |j d |_ t |d dd |jd |_|jtddttd|jjttttd|jtttd|jtddtd|j jttdd|j jttd|jjttdddS)NryTrrwrrZEditrr)r^rrHrwZAdd)r^rHrwZRemover)rbrrcrd)rbrrdrrr)r!rr helplistr*rrrhelp_source_selectedr#helplist_item_editbutton_helplist_edithelplist_item_addZbutton_helplist_addhelplist_item_removebutton_helplist_removerrrr rrr rrr )rTZframe_helplistZscroll_helplistZ frame_buttonsrWrWrXr0s:  zHelpFrame.create_frame_helpcCs |dSr)set_add_delete_staterrWrWrXr bszHelpFrame.help_source_selectedcCsh|jdkr(|jd|jdn<|jrL|jd|jdn|jd|jddS)NrrJrX)r sizer rrrrrWrWrXrfs    zHelpFrame.set_add_delete_statecCs:t|dj}|r6|j||jt|d|dS)NzNew Help Sourcer)r6rg user_helplistrr rrupdate_help_changes)rT help_sourcerWrWrXr ss   zHelpFrame.helplist_item_addcCsx|jt}|j|}t|d|d|ddj}|rt||krt||j|<|j||j||d|| dS)NzEdit Help Sourcerr)Zmenuitemfilepath) r rrrr6rgrrrr)rT item_indexrZnew_help_sourcerWrWrXr s     zHelpFrame.helplist_item_editcCs4|jt}|j|=|j|||dSr)r rrrrrr)rTrrWrWrXrs   zHelpFrame.helplist_item_removec CsVitdd<tdt|jdD]0}tddt|d|j|dddq dS)NrZ HelpFilesr;rv)rr0r.rrr1r)rTnumrWrWrXrs   zHelpFrame.update_help_changescCsBt|_|jdd|jD]}|jt|dq|dS)Nrr)r0ZGetAllExtraHelpSourcesListrr rrrr)rTZ help_itemrWrWrXrs   zHelpFrame.load_helplist) rrrrIrr rr r rrrrrWrWrrXr)s 2   rc@s@eZdZddZddZddZeddZd d Zd d Z d S)VarTracecCsg|_g|_dSr)untracedtracedrrWrWrXrIs zVarTrace.__init__cCs|j|jdSr)rrrrrWrWrXrs zVarTrace.clearcCs*t|tr|||}|j||f|Sr) isinstancetuple make_callbackrrrTrcallbackrWrWrXrqs  z VarTrace.addcsfdd}|S)NcstjgRdSr)rrr)rrrrWrXdefault_callbacksz0VarTrace.make_callback..default_callbackrW)rrr"rWr!rXrszVarTrace.make_callbackcCs6|jr2|j\}}|d||j||fqdS)Nwrite)rpopZ trace_addrrrrWrWrXrSs zVarTrace.attachcCsB|jr>|j\}}|d|dd|j||fqdS)Nr#rr)rr$Z trace_removeZ trace_inforrrrWrWrXdetachszVarTrace.detachN) rrrrIrrqrrrSr%rWrWrWrXrs  ra7When 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. )r\r_rrr`cCs0|sdSzt|WdSty*YdS0dS)NTF)rrrrWrWrXr3 s rc@seZdZddZdS)rcstj||g|Ri|t|td}|jtttdt|dd|j ddjt t t d|j jdddt|_jddtdfd d }d |fd d }d |dS)Nr|)rdrbrcr)r{rrrHrr)Zwindowrcs$f}jd|ddS)Nz 0 0 %s %s)Z scrollregion)winfo_reqwidthZwinfo_reqheightr)rr)canvasrrWrX_configure_interiorZ sz;VerticalScrolledFrame.__init__.._configure_interiorz cs&kr"jddS)N)rH)r'Z winfo_widthZ itemconfigure)rr(rZ interior_idrWrX_configure_canvas` sz9VerticalScrolledFrame.__init__.._configure_canvas)r!rIr*rrrrr r rrrrr rrZ xview_movetoZ yview_movetorZ create_windowrr)rTrJrmkwZ vscrollbarr)r+rWr*rXrIE s"     zVerticalScrolledFrame.__init__N)rrrrIrWrWrWrXr> sr__main__)rz#idlelib.idle_test.test_configdialogrvF) verbosityexit)run)crtkinterrrrrrrrr r r r r rrrrrrrrrrrrrrrrrrr Z tkinter.ttkr!r"r#r$r%r&r'r(r)r*r+r,r-r.Z tkinter.fontrrr/Zidlelib.configr0r1Zidlelib.config_keyr2Zidlelib.dynoptionr3Zidlelibr4Z idlelib.queryr5r6Zidlelib.textviewr7Zidlelib.autocompleter8Zidlelib.codecontextr9Zidlelib.parenmatchr:Zidlelib.formatr;Zidlelib.squeezerr<r=rrr>rrmrkrnrorprirrrRrrrrrZunittestrZidlelib.idle_test.htestr0rWrWrWrX sz<             W+4SD=> +