3  f@sJdZddlmZmZmZmZmZmZmZm 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,ddl-j.Z/ddl0j1Z2ddlm3Z3ddl4m5Z5m6Z6ddl7m8Z8ddl9m:Z:dd l;mZ>m?Z?dd l@mAZAdd lBmCZCdd lDmEZEddlFmGZGddlHmIZIddlJmKZKe6ZLeCeEeGeIeKfZMGdddeZNdaOGddde%ZPGddde%ZQGddde%ZRGddde%ZSGdddZTeTZUdZVdd d!d"d#ZWd$d%ZXGd&d'd'e%ZYeZd(krFdd)l[m\Z\e\d*d+d,d-dd.l]m^Z^e^eNdS)/aIDLE 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. )ToplevelListboxTextScaleCanvas StringVar BooleanVarIntVarTRUEFALSETOPBOTTOMRIGHTLEFTSOLIDGROOVENONEBOTHXYWEEWNSNSEWNW HORIZONTALVERTICALANCHORACTIVEEND) Button CheckbuttonEntryFrameLabel LabelFrame OptionMenuNotebook Radiobutton ScrollbarStyleN) messagebox)idleConf ConfigChanges) GetKeysDialog) DynOptionMenu)macosx) SectionName HelpSource) view_text) AutoComplete) CodeContext) ParenMatch)FormatParagraph)SqueezercseZdZdZd%dddddZddZd d Zd d Zd dZddZ fddZ ddZ ddZ ddZ ddZddZddZdd Zd!d"Zd#d$ZZS)& ConfigDialogzConfig dialog for IDLE. F)_htest_utestcCstj||||_|ri|_|s(|j|jdd|j|p>d|jd}|j|s\dnd}|j d|d||j |j t t d|j ||jd |j|jjjtj|s|j|j|jd S) aShow 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. ) borderwidthzIDLE Preferences+)heightwidthZWM_DELETE_WINDOWN)r__init__parent instance_dictZwithdraw configuretitleZ winfo_rootxZ winfo_rootyZgeometrycreate_widgetsZ resizabler Z transientZprotocolcancelfontpagefontlistZ focus_settracersattachZgrab_setZ wm_deiconifyZ wait_window)selfrGrJr<r=xyrT9/opt/alt/python36/lib64/python3.6/idlelib/configdialog.pyrF-s*     zConfigDialog.__init__cCst||_}t||_t||j|_t||_t||_ |j |_ |j |jdd|j |jdd|j |jdd|j |j dd|j |j dd|j |jtttd|jjtdd S) aCreate and place widgets for tabbed dialog. Widgets Bound to self: note: Notebook highpage: HighPage fontpage: FontPage keyspage: KeysPage genpage: GenPage extpage: self.create_page_extensions Methods: create_action_buttons load_configs: Load pages except for extensions. activate_config_changes: Tell editors to reload. z Fonts/Tabs)text Highlightsz Keys z General Z Extensions)sideexpandfill)rXN)r(noteHighPagehighpageFontPagerMKeysPageZkeyspageGenPageZgenpagecreate_page_extensionsZextpageaddZenable_traversalpackr r rcreate_action_buttonsr )rQr[rTrTrUrK]s    zConfigDialog.create_widgetscCstjri}nddi}t|dd}t|dd}xRd|jfd|jfd|jfd |jffD]*\}}t|f||td |j t d d qTWt|dd dj t d|j t d|S)aReturn 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 padding)reZOkZApplyZCancelZHelp)rVcommand takefocusr>)rXpadxr)rDr?)rX)rfrg) r1ZisAquaTkr$okapplyrLhelpr!r rcrr r )rQZ padding_argsZouterZbuttonsZtxtcmdrTrTrUrd|s   z"ConfigDialog.create_action_buttonscCs|j|jdS)zvApply config changes, then dismiss dialog. Methods: apply destroy: inherited N)rmdestroy)rQrTrTrUrlszConfigDialog.okcCs$|jtj|j|jdS)zApply config changes and leave dialog open. Methods: deactivate_current_config save_all_changed_extensions activate_config_changes N)deactivate_current_configchangessave_allsave_all_changed_extensionsactivate_config_changes)rQrTrTrUrmszConfigDialog.applycCs |jdS)zPDismiss config dialog. Methods: destroy: inherited N)rp)rQrTrTrUrLszConfigDialog.cancelcs&|jjjdda|jtjdS)Nz1.0end)rM font_samplegetfont_sample_textZ grab_releasesuperrp)rQ) __class__rTrUrpszConfigDialog.destroycCs8|jj|jjddj}t|dttj|dddS)zCreate textview for config dialog help. Attrbutes accessed: note Methods: view_text: Method from textview module. rV)ZoptionzHelp for IDLE preferencesr;)rJrVN)r[ZtabZselectstripr4 help_common help_pagesrx)rQZpagerTrTrUrns zConfigDialog.helpcCs&|jjj}x|D] }|jqWdS)zRemove current key bindings. Iterate over window instances defined in parent and remove the keybindings. N)rGrHkeysZRemoveKeybindings)rQ win_instancesinstancerTrTrUrqs  z&ConfigDialog.deactivate_current_configcCs\|jjj}x4|D],}|j|j|j|j|jqWxtD] }|j qHWdS)zApply configuration changes to current windows. Dynamically update the current parent window instances with some of the configuration changes. N) rGrHrZResetColorizerZ ResetFontZset_notabs_indentwidthZApplyKeybindingsZreset_help_menu_entries reloadablesreload)rQrrklassrTrTrUrus    z$ConfigDialog.activate_config_changescCsh|j}t|j}tjd|_tjd|_|jt |_ |j t ||_ |j ddd|jdddt||j dd|_|jjd|jt||jjd }|j|j_t|d d d |_|jjddd d |jdddd |jjdddddgd|jddi|_d|_||_|j|_d}x.t|j D] }|j!||d|d}qW|j j||jj"d|jd|S)a7Part of the config dialog used for configuring IDLE extensions. This code is generic - it works for any and all IDLE extensions. IDLE extensions save their configuration options using idleConf. This code reads the current configuration using idleConf, supplies a GUI interface to change the configuration values, and saves the changes using idleConf. Not all changes take effect immediately - some 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: load_extensions: 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(). extensionsr)weightrhZbrowse)Z listvariableZ selectmodez<>)ri)rErDZnws)columnrowstickynsnsew )rrrrk)reNr;{z} )#rGr$r[r- defaultCfgext_defaultCfguserCfg ext_userCfgregisteris_intload_extensionsrZextension_names rowconfigurecolumnconfigurerextension_listbindextension_selectedr*yviewsetyscrollcommandr& details_framegridrI config_framecurrent_extensionZ outerframeZtabbed_page_setsortedrcreate_extension_frameZ selection_set)rQrGframeZscrollZ ext_namesext_namerTrTrUras>            z#ConfigDialog.create_page_extensionsc Cs^i|_xtjddD]}g|j|<qWx0|jD]$}t|jj|}dd|D}x|D]}|j|qZW||}x|D]}|jj||dd}yddd|}d}WnBtk ryt |}d }Wnt k r|}d }YnXYnXy|j j|||d|d }Wnt k r|}YnXt |} | j t||j|j||||| d qzWq0Wd S) zAFill self.extensions with data from the default and user configs.F)Z active_onlycSsg|]}|jdr|qS)enable) startswith).0opt_namerTrTrU 8sz0ConfigDialog.load_extensions..T)raw)TrueFalseboolintN)typerdefault)namerrvaluevar)rr-Z GetExtensionsrrZ GetOptionListremoveGetKeyErrorr ValueErrorrrrstrappend) rQrZopt_listZenablesrZdef_strZdef_objZopt_typerrrTrTrUr-sF      zConfigDialog.load_extensionscCs|jj}|r|jj|}|dks,||jkrV|jrV|jjdd|j|jjd|_|r|jj|d|j|jdddd||_dS)z/Handle selection of an extension from the list.Nr;)rVrr)rrr) r curselectionrxrrconfigrZ grid_forgetr)rQeventZnewselrTrTrUr[s  zConfigDialog.extension_selectedcCst|jddd}||j|<|j}xt|j|D]\}}t||dd}|j|dtd|d}|dd krt ||d d d d j|dt ddq0|ddkrt ||d|j dfddj|dt ddq0t ||ddj|dt ddq0WdS)z=Create a frame holding the widgets to configure one extensionr)rDrEr)rVr)rrrrrrrr)variableonvalueoffvaluerEr)rrrrkrkeyz%Pr) textvariableZvalidateZvalidatecommandrE)rrEN)VerticalScrolledFramerrinterior enumeraterr%rrr"rr#rr)rQrfZ entry_arearoptZlabelrrTrTrUrjs$    z#ConfigDialog.create_extension_framecCsX|d}|d}|djjp"|}|dj|||krH|jj||S|jj|||S)zReturn True if the configuration was added or changed. If the value is the same as the default, then remove it from user config file. rrr)rxr|rrZ RemoveOption SetOption)rQZsectionrrrrrTrTrUset_extension_valuesz ConfigDialog.set_extension_valuecCsNd}x6|jD],}|j|}x|D]}|j||r d}q Wq W|rJ|jjdS)zSave configuration changes to the user config file. Attributes accessed: extensions Methods: set_extension_value FTN)rrrZSave)rQZ has_changesrZoptionsrrTrTrUrts      z(ConfigDialog.save_all_changed_extensions)r;)__name__ __module__ __qualname____doc__rFrKrdrlrmrLrprnrqrurarrrrrt __classcell__rTrT)r{rUr:)s"0&     >.r:u^ AaBbCcDdEeFfGgHhIiJj 1234567890#:+=(){}[] ¢£¥§©«®¶½ĞÀÁÂÃÄÅÇÐØß ɐɕɘɞɟɤɫɮɰɷɻʁʃʆʎʞʢʫʭʯ ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκ БбДдЖжПпФфЧчЪъЭэѠѤѬӜ אבגדהוזחטיךכלםמןנסעף ابجدهوزحطي٠١٢٣٤٥٦٧٨٩ ०१२३४५६७८९अआइईउऊएऐओऔ ௦௧௨௩௪௫௬௭௮௯அஇஉஎ 〇一二三四五六七八九 汉字漢字人木火土金水 가냐더려모뵤수유즈치 あいうえおアイウエオ csVeZdZfddZddZddZddZd d Zdd d ZddZ ddZ Z S)r^cs0tj||j|_|j|j|jdS)N)rzrFhighlight_samplecreate_page_font_tab load_font_cfg load_tab_cfg)rQmasterr])r{rTrUrFs  zFontPage.__init__c Cs~tjt||j|_tjt||j|_tjt||j|_tjt|d.|_ t |dt dd}t |dt dd}t |dt dd}t |}t |}t |td d }t|d d td |_|jjd|j|jjd|j|jjd|jt|}|j|jjd|jj|jdt |dd}t||jd|_t||jdddd|_t|ddd|_|jjtt t |tdd } t!||j ddddd|_"|j#ddd |j$ddd!d!d"|j$dddd!d!d#d$|j$ddd!d!d%d&|j%t&d!d!t'd'|j%t&d!d!t'd'|j%t&t(d(|jj%tt)t'd)|j%tt*d*|j%tt(d(|jj%tt(d(|jj%tt(dd+|jj%t)t+d,| j%t&t(d!d+|j"j%t&d!t'd-dS)/aReturn frame of widgets for Font/Tabs 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. Tabs: Enable users to change spaces entered for indent tabs. Changing indent_scale value with the mouse sets Var space_num, which invokes the default callback to add an entry to changes. Load_tab_cfg initializes space_num to default. 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 frame_indent: LabelFrame indent_title: Label (*)indent_scale: Scale - space_num mainIndent num-spacesrhz Shell/Editor Font )r?reliefrVz Font Sample (Editable) z Indentation Width z Font Face :)ZjustifyrVrT)rDrjexportselectionzzz)ri)rzSize :)rVNrrZBold)rrrrVr@)rErDzPython Standard: 4 Spaces!Z horizontal)rorientZ tickintervalZfrom_Zto)rr>)rrrkpadyr)rrZrowspanrkrrZew)rrrkrr)rXrkrrZ)rXanchor)rXrYrZ)rXrZ)rXrrk)rYrZ)rXrkrZ)rrr),rOrbrvar_changed_font font_name font_sizer font_boldr space_numr&rr$r%rrr rNron_fontlist_selectr*rrrr0sizelistr"Z bold_togglerrwinsertr ryrZ indent_scalerrrcr rrr rr) rQZ frame_fontZ frame_sampleZ frame_indentZframe_font_nameZframe_font_paramZfont_name_titleZ scroll_fontZfont_size_titleZ indent_titlerTrTrUrsh.   zFontPage.create_page_font_tabc Cstj|dd}|dj}|d}|ddk}ttj|}|jx|D]}|jjt |qJW|j j |dd|D}y>|j |}|jj ||jj||jj||jj|Wntk rYnX|jjd||jj ||jdS)aLoad 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. r EditorWindowrrrhZboldcSsg|] }|jqSrT)lower)rsrTrTrUr^sz*FontPage.load_font_cfg..78910111213141618202225293440N)rrrrrrrrrrrrrrrr)r-ZGetFontrlisttkFontZfamiliessortrNrr rrindexsee select_set select_anchorZactivaterrSetMenur set_samples) rQZconfigured_fontrrrZfontsfontZlc_fontsZcurrent_font_indexrTrTrUrLs.         zFontPage.load_font_cfgcGsZ|jj}tjddd||jj}tjddd||jj}tjddd||jdS)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. rrrz font-sizez font-boldN)rrxrr add_optionrrr)rQparamsrrTrTrUros   zFontPage.var_changed_fontcCs0|jj|jjdkrtnt}|jj|jdS)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. Z KeyReleaseN) rNrxrrrrrrr)rQrrrTrTrUr~szFontPage.on_fontlist_selectNcCsH|jj}|jjrtjntj}||jj|f}||jd<||jd<dS)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. rN) rrxrrZBOLDZNORMALrrwr)rQrrZ font_weightZnew_fontrTrTrUrs   zFontPage.set_samplescCs$tjdddddd}|jj|dS)zLoad current configuration settings for the tab options. Attributes updated: space_num: Set to value from idleConf. rrz num-spacesr)rrN)r- GetOptionrr)rQrrTrTrUrszFontPage.load_tab_cfgcGs|jj}tjddd|dS)z!Store change to indentation size.rrz num-spacesN)rrxrrr)rQrrrTrTrUvar_changed_space_nums zFontPage.var_changed_space_num)N) rrrrFrrrrrrr rrTrT)r{rUr^s m#  r^cseZdZfddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*ZZS)+r\cs2tj||j|_t||_|j|jdS)N)rzrFrcdr+stylecreate_page_highlightload_theme_cfg)rQr)r{rTrUrFs   zHighPage.__init__c $sdsdtdudvdwdxdydzd{d|d}d~dddd_tjtj_tjtj_t_ tjtj _ tjtj _ tjtj_td td!d"}td td#d"}t|td$dd(d)d*td+td, }_|jd-d.d/|jd0d1d/d}x$|D]}|jt|d+|d$qWx8jD].}|ffdLdM }|jj|d+dN|q(WdO|dP<jjdQd$dRdSt|dQdT_t|}tjdUj dV_!t"jjdWd+dX_#t$|j d$dYj%dZ_&t$|j d+d[j%dZ_'j j(d$t|d\j)dV_*t+|d]d^} t$|j d$j,d_d`_-t$|j d+j,dad`_.t"|jdWdWdb_/t"|jdWdWdb_0t|dcj1dV_2t+|d dd_3|j4t5dedet6t7df|j4t8dedet9dgjj4t8dedet6t9df|j4t8ded+dhjj4t8dedet6t7dfj!j4t8t6t9didjdkj#j4t8t6t9didldkj&j4t5t:dmj'j4t;tcSsdS)Nr#rT)erTrTrULsz0HighPage.create_page_highlight..z cSsdS)Nr#rT)r.rTrTrUr/Ms #you can click here#to choose itemscode context section def func (param): """string""" var0 = 'string' var1 = 'selected' var2 = 'found' var3 = r(None)  breakpoint("line") error cursor | shellcsjj|dS)N)highlight_targetr)relem)rQrTrUtemdsz+HighPage.create_page_highlight..temzdisabledstatezframe_color_set.TFrameZsolid)r?r)r zChoose Color for :)rVriN)r-Z Foreground)rrrVriZ BackgroundzSave as New Custom Themez Select : )rVza Built-in Theme)rrrirVza Custom Theme)rizDelete Custom Theme)r?r>)rXrkrrYrZ)rXrkrrZ)rXrkrrr)rXrYrZrkrrg)rXr)rXrZrkr)rXrrkr)rXrrk)rXrZrrkr)rXrZr)rr)rr)rr)rr)rr)rr)rr)rr)rr )r!r")r#r)r$r)r%r)r&r)r'r)r)r*r;r0rr1rr0rr2rr0rr3rr4rr5rr6rr7rr8rr9rr:rr;rr<rr=rr>rr?rr@rrrrArrBrrCrrDr#r4rrEr%r6rrFr!rGrrHr$r6rr&r&r6rr'r'r4r)#rNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorp)>theme_elementsrOrbrvar_changed_builtin_name builtin_namevar_changed_custom_name custom_namer fg_bg_togglevar_changed_colorcolorvar_changed_theme_source theme_sourcevar_changed_highlight_targetrIr&rrrr rrrrr Ztag_bindr rIr$frame_color_setr! get_colorZbutton_set_colorr0 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_messagercrr rr rrrrr ) rQ frame_customZ frame_themerVZ text_and_tagsZtexttagelementrKZframe_fg_bg_toggleZtheme_type_titlerT)rQrUr sv            zHighPage.create_page_highlightcs.jjtjddddddtj}jjrtjdd}|jjj ||tjdd}|j|sj j dj jd qވj j ||d nHtjdd}|jj j ||tjdd}|jjj ||d jtjj}|jfd d djj ||d jjdS)aLoad 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 rThemerrr)rr highlightuserrLz- no custom themes -rcsj|dS)Nr)rq)rR)rQrTrUr/sz)HighPage.load_theme_cfg..)rN)rL)rzrr-r Z CurrentThemerxGetSectionListrrrrrMrurrrrqrr~paint_theme_sampleset_highlight_target)rQcurrent_option item_listZ theme_namesrT)rQrUrs2       zHighPage.load_theme_cfgcGsd }|jj}||krXtjddd|krrirZxscrollcommandzGet New Keys for SelectionrL)rVrirMcsg|]}tdddqS)rhr)rer?)r$)ri)frame_key_setsrTrUrsz-KeysPage.create_page_keys..rrzUse a Built-in Key Set)rrrirVzUse a Custom Key SetN)rizDelete Custom Key Set)rVrizSave as New Custom Key Set)r?r>)rXrkrrYrZ)rXrkrrZ)rXrZrkr)r)rrZ columnspanr)rrr)rrrrkrT)rXrZrYrk)rXrZrY)rXrZrYr)8rOrbrrrrsrtrurvar_changed_keyset_source keyset_sourcevar_changed_keybinding keybindingr&rr$r%r*rrr bindingslistron_bindingslist_selectrZxviewrr! get_new_keysbutton_new_keysranger) set_keys_typeZbuiltin_keyset_oncustom_keyset_onr0rrdelete_custom_keysbutton_delete_custom_keyssave_as_new_key_setZbutton_save_custom_keys keys_messagercr r rrrrrrrrrrr )rQrZ frame_targetZ target_titleZscroll_target_yZscroll_target_xZframesrT)rrUr:sR            zKeysPage.create_page_keyscCs|jjtjddddddtj}|jjrtjdd}|j|jj ||tjdd}|j|s|j j d |j jd q|j j ||d nHtjdd}|j|j j ||tjdd}|j|jj |tj|jtj}|j|d S)z?Load current configuration settings for the keybinding options.rKeysrrr)rrrrrLz- no custom keys -rN)rL)rrr-r Z CurrentKeysrxrrrrrrMrur default_keysrload_keys_list)rQrr keyset_namerTrTrUrs,       zKeysPage.load_key_cfgcGsd}|jj}||krXtjddd|kr|j,t-|d?d@dA|j.dB|_/t-|dCdA|j0dD|_1t-|dEd@dA|j2dB|_3|j4t5d9d9t6t7dF|j4t5d9d9t6t7dF|j4t5d9d9t6t7dF|j4t5d9d9t6t7dF|j4t5d9dt8dG|j4t9t:d9d9dH|jj4t;t:d9d9dH|jj4t;t:d9d9dH|j4t5d9dt8dG|j4t9t:d9d9dH|jj4t;tT)rDrjrrirzZEditrLr)rVrMrEriZAdd)rVrEriZRemove)rXrkrrYrZ)rXrkrrZ)rXrrkrr)rXrr)rXrkr)rXrrkr)rXrrZ)rXrrYrZ)rXrN)rrr)rrrE)rrrD)rr5r)rr7r )rr7r)rr7r)rrr)rrr)rr8r)rr6r)>rOrbr startup_editr win_width win_heightautocomplete_wait paren_style flash_delayr paren_bellauto_squeeze_min_linesr format_width context_linesr&rr$r%r)Zstartup_editor_onZstartup_shell_onr#Z win_width_intZwin_height_intZ auto_wait_intr'Zparen_style_typeZparen_flash_timer"Zbell_onZ save_ask_onZ save_auto_onZformat_width_intZ context_intZauto_squeeze_min_lines_intrr helplistr*rrrhelp_source_selectedr!helplist_item_editbutton_helplist_edithelplist_item_addZbutton_helplist_addhelplist_item_removebutton_helplist_removercr r rrrrrrr)rQZ frame_windowZ frame_editorZ frame_shellZ frame_helpZ frame_runZ startup_titleZframe_win_sizeZwin_size_titleZwin_width_titleZwin_height_titleZframe_autocompleteZauto_wait_titleZ frame_paren1Zparen_style_titleZ frame_paren2Zparen_time_titleZ frame_saveZrun_save_titleZ frame_formatZformat_width_titleZ frame_contextZ context_titleZframe_auto_squeeze_min_linesZauto_squeeze_min_lines_titleZframe_helplistZframe_helplist_buttonsZscroll_helplistrTrTrUrs*B                           zGenPage.create_page_generalcCs`|jjtjddddd|jjtjddddd|jjtjddd dd|jjtjd d d dd|jjtjd d d|jjtjd d ddd|j jtjd d d|j jtjdddddd|j jtjd dddd|j jtjd dddd|j jtjdddddtj|_|jjddx"|jD]}|jjt|dq8W|jdS)z.default_callbackrT)rrrrT)rrrUrsszVarTrace.make_callbackcCs:x4|jr4|jj\}}|jd||jj||fqWdS)z0Attach callback to all vars that are not traced.writeN)r popZ trace_addr r)rQrrrTrTrUrP{s zVarTrace.attachcCsFx@|jr@|jj\}}|jd|jdd|jj||fqWdS)z!Remove callback from traced vars.rrrN)r rZ trace_removeZ trace_infor r)rQrrrTrTrUdetachszVarTrace.detachN) rrrrrFr rbrrrPrrTrTrTrUr Ms  r a7When 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 milleseconds 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". )z Fonts/TabsrWrrc Cs.|sdSy t|dStk r(dSXdS)z(Return 's is blank or represents an int'TFN)rr)rrTrTrUrsrc@seZdZdZddZdS)rzA 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 cstj||f||t|td}|jtttdt|dd|j ddjt t t d|j jdjdjdt|_jddtdfd d }jd |fd d }jd |dS)N)r)rZrXrYr)r?r-rrE)rXrZrY)ri)Zwindowrcs$jjf}jd|ddS)Nz 0 0 %s %s)Z scrollregion)winfo_reqwidthZwinfo_reqheightr)rr)canvasrrTrU_configure_interiorsz;VerticalScrolledFrame.__init__.._configure_interiorz cs&jjkr"jjddS)N)rE)rZ winfo_widthZ itemconfigure)r)rr interior_idrTrU_configure_canvassz9VerticalScrolledFrame.__init__.._configure_canvas)r$rFr*rrcrrr rrrrr rrZ xview_movetoZ yview_movetorZ create_windowrr)rQrGrkwZ vscrollbarrrrT)rrrrUrFs       zVerticalScrolledFrame.__init__N)rrrrrFrTrTrTrUrsr__main__)rz#idlelib.idle_test.test_configdialogrhF) verbosityexit)run)_rZtkinterrrrrrrrr r r r r rrrrrrrrrrrrrrrrrrr Z tkinter.ttkr!r"r#r$r%r&r'r(r)r*r+Ztkinter.colorchooserZ colorchooserrZ tkinter.fontrrr,Zidlelib.configr-r.Zidlelib.config_keyr/Zidlelib.dynoptionr0Zidlelibr1Z idlelib.queryr2r3Zidlelib.textviewr4Zidlelib.autocompleter5Zidlelib.codecontextr6Zidlelib.parenmatchr7Zidlelib.paragraphr8Zidlelib.squeezerr9rrrr:ryr^r\r_r`r rOr}r~rrrZunittestrZidlelib.idle_test.htestr rTrTrTrU sj4            Q4l= +