403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.145
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__/replace.cpython-315.opt-1.pyc
R
>lqj�)c��Qs]PHs]QHGsGs]QHGs]QHGsQ
Qks	QQ\2s
Qs\Q6Xc"]Q	H4Gs\Q
]P
Q5]QH<Gs\\2P!P!)z�Replace dialog for IDLE. Inherits SearchDialogBase for GUI.
Uses idlelib.searchengine.SearchEngine for search capability.
Defines various replace related functions like replace, replace all,
and replace+find.
)�	StringVar�TclError)�SearchDialogBase)�searchenginec��UO2o[OU2o[UQ2%f[	V#2UmUO
oUOQQ2oUO
VUQ5P!)z�Create or reuse a singleton ReplaceDialog instance.

The singleton dialog saves user entries and preferences
across instances.

Args:
    text: Text widget containing the text to be searched.
�_replacedialog�	sel.first�sel.last)�insert_tags)�_rootr�get�hasattr�
ReplaceDialogr�open)�textr	�root�engine�dialog�searchphrases&&    �$C:\Python315\\Lib\idlelib\replace.py�replacerse���:�:�<�D�
�
�
�d�
#�F��6�+�,�,� -�d� ;���
�
"�
"�F��8�8�K��4�L�
�K�K���K�<�c�``�\sQs] snQsQsQsU1QksQQP-QkksQs	Qs
QQ	ksQQ
ksQQks
QsQQ
ksQQksQsQsQQksQsUsU9s!)r
z3Dialog for finding and replacing a pattern in text.zReplace Dialog�Replacec�V:�[RU_V2[U2UmPUmP!)a�Create search dialog for finding and replacing text.

Uses SearchDialogBase as the basis for the GUI and a
searchengine instance to prepare the search.

Attributes:
    replvar: StringVar containing 'Replace with:' value.
    replent: Entry widget for replvar.  Created in
        create_entries().
    ok: Boolean used in searchengine.search_text to indicate
        whether the search includes the selection.
)�super�__init__r�replvarr	)�selfrr�	__class__s&&&�rr�ReplaceDialog.__init__&s%���	����&� �������rr	c�P�[OVU2P	UmV0mP!)z�Make dialog visible on top of others and ready to use.

Also, set the search to include the current selection
(self.ok).

Args:
    text: Text widget being searched.
    searchphrase: String phrase to search.
)rr�okr	)rrrr	s&&&$rr�ReplaceDialog.open7s!��	���d�,�7����&�rc��[OU2UOQUO2]*UmP!)z8Create base and additional label and text entry widgets.z
Replace with:)r�create_entries�
make_entryr�replent�rs&rr$�ReplaceDialog.create_entriesEs+���'�'��-��������E�a�H��rc��[OU2UOQUO2UOQUO2UOQUO
P	Q5UOQUO2P!)zzCreate base and additional command buttons.

The additional buttons are for Find, Replace,
Replace+Find, and Replace All.
�FindrzReplace+Find)�isdefzReplace All)r�create_command_buttons�make_button�find_it�
replace_it�default_command�replace_allr's&rr,�$ReplaceDialog.create_command_buttonsJsk��	�/�/��5��������.�����D�O�O�4������)=�)=�T��J������(8�(8�9rc�*�UOP
2P!)zHandle the Find button.)�do_find�r�events&&rr.�ReplaceDialog.find_itVs�����U�rc�n�UOUO2%cUO2P!P!)zMHandle the Replace button.

If the find is successful, then perform replace.
�r4r!�
do_replacer5s&&rr/�ReplaceDialog.replace_itZs&��
�<�<���� � ��O�O��!rc��UOUO2%c,UO2%cUOP
2P!P!P!)z�Handle the Replace+Find button as the default command.

First performs a replace and then, if the replace was
successful, a find next.
r9r5s&&rr0�ReplaceDialog.default_commandbs:���<�<���� � ���� � ����U�#�!�!rc���UOO2%cUOU2oU!SoU![Oc#SOOSQ2PoS!h9h)z.Expand replacement text if regular expression.zInvalid Replace Expression)r�isre�expand�re�PatternError�report_error)r�m�repl�news&&& r�_replace_expand�ReplaceDialog._replace_expandmsp���;�;�����
��h�h�t�n���
��C��
��
�?�?�
����(�(��/K�L����
�

�s�:�A1�A1�0A1c	��UOO2oU%fP!UOO2oUOoUOOVB2oU%fUO
2P!UOQQQ2UOQQQ2U]*oU]*O2oPoUOO2%c]o]oLUUOO2%c6QoUOUQVe]*O21*2]o]oP	o	P9q�UO2UOOVBVgP
U	Q59o%c�UvqlUO2vq�Ud#UO!QVm1*QU2%cL�UO#2oUO%V�2oUeL�QVm1*o
QVn1*oUU6XcUOQ	U2LNUOQ	U
2V�6wcUO'V�2U%cUO)U
UUO*2U
[-U2*oP
o	CJUdUO/U2UO12U
%cU%cUO3V�2UO52P!)
a�Handle the Replace All button.

Search text for occurrences of the Find value and replace each
of them.  The 'wrap around' and direction values control which
occurrences are replaced.  With wrap around, every occurrence is
replaced.  Without it, a forward search replaces occurrences from
the current position to the end of the text, and a backward search
replaces occurrences from the beginning of the text to the current
position.  The replacement is always done top-to-bottom.
�sel�1.0�end�hit�replace_all_stop�%d.%d)�wrapr!z>=�insert)r�getprogrrr�search_text�bell�
tag_remove�start�iswrap�isback�mark_setrL�undo_block_start�search_forward�span�compare�grouprG�deleterQr	�len�
mark_unset�undo_block_stop�show_hit�close)rr6�progrEr�res�line�col�stopr!�first�lastrD�i�j�origrFs&&               rr1�ReplaceDialog.replace_allzsE���{�{�"�"�$�����|�|���!���y�y���k�k�%�%�d�1����I�I�K������u�e�,�����u�e�,��1�v���!�f�l�l�n�����;�;������D��C�
�[�[�
�
�
!�
!�%�D��M�M�$��4�Q�����*>� >�?��D��C�
����������[�[�/�/��D�E�b�0�:�:�c�:��G�D��6�6�8�D�A���D�L�L��D�9�1D�d�D�$Q�$Q���7�7�9�D��&�&�q�/�C��{���t�i�'�E��d�Y�&�D��d�{��
�
�h��-��
�
�h��.��=��K�K��,���K�K��s�D�,<�,<�=��c�#�h�,�C��B����O�O�D�!������T��M�M�%�&��
�
�rc�V�UOO2%fP
!UOoUOOUPU2oU%fUO	2P
!UvqEUO2vqgQVF1*oQVG1*o	UO
V�2P	UmP	!)zlSearch for and highlight next occurrence of pattern in text.

No text replacement is done with this option.
rO)rrRrrSrTr\rcr!)
rr!rrfrgrDrlrmrjrks
&&        rr4�ReplaceDialog.do_find�s���
�{�{�"�"�$�$���y�y���k�k�%�%�d�D�"�5����I�I�K������v�v�x����4�)�#���$��"���
�
�e�"����rc�l�UOO2oU%fP
!UOoUOQ29q4UOQ2oU%fUOQ29o9qT[
OU2vqgUOQU*QU]**2oUOV�2o	U%fP
!UOV�OO22o
U
eP
!UOQW2UO2U	O2%cUOUW2U
%cUOV:UO 2UO#2UO%V2OQ22P
UmP	![cPoCK\h9h)z6Replace search pattern in text with replacement value.rrrQz%d.0)rrRr�indexrr�get_line_colr�matchrGrrYrZr^r_rQr	rbrcr!)rrerrj�posrkrgrh�charsrDrFs&          rr:�ReplaceDialog.do_replace�sU���{�{�"�"�$�����y�y��	��*�*�[�1�1�E��:�:�j�)�D��!%���H�!5�5�E�5�D� �-�-�c�2�	������$���$�q�&�(9�:���J�J�u�"�����"�"�1�l�l�&6�&6�&8�9���;���
�
�h��&������7�7�9�9��K�K��t�$���K�K��D�$4�$4�5������
�
�e�Z�Z��1�2������+�	��C�	�s�#F"�"	F3�,F3�2F3c�L�UOoUOQU2UOQQQ2UOQV2UOQQQ2V6XcUOQU2LUOQV2UO	Q2UO2P!)aRHighlight text between first and last indices.

Text is highlighted via the 'hit' tag and the marked
section is brought into view.

The colors from the 'hit' tag aren't currently shown
when the text is displayed.  This is due to the 'sel'
tag being added first, so the colors in the 'sel'
config are seen instead of the colors for 'hit'.
rQrJrKrLrM)rrYrU�tag_add�see�update_idletasks)rrjrkrs&&& rrc�ReplaceDialog.show_hit�s����y�y���
�
�h��&�����u�e�,����U�E�(�����u�e�,��=��L�L���&��L�L���,���������rc�|�[OV2UOOQQQ2PUmP!)z%Close the dialog and remove hit tags.rMrKrL)rrdrrUr	r5s&&rrd�ReplaceDialog.close
s.�����t�+��	�	���U�E�5�1���r)r	r!r&r�N)F)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�title�iconrrr$r,r.r/r0rGr1r4r:rcrd�__static_attributes__�__classdictcell__�
__classcell__)r�
__classdict__s@@rr
r
 sc����9��E��D� �"'�4�'�I�

:���	$��C�J�(�@ �. � rr
c�*`
``�]QHGoGoGn
Gn]QHGoGoUU2oUOQ2[[UO2OQ2Q*2vqgUOQVg]�*1*2QoQo	UU2o
U
O2UU
Q	Q
5nURmU	RmRO2RO!QQ2RO#2U
UU1Q
koUU
QUQ5oUO2P!)�)�Toplevel�Text�END�SEL)�Frame�ButtonzTest ReplaceDialog�+:�NNz+%d+%dc��P!r��r�rrrZ�)_replace_dialog.<locals>.undo_block_start���rc��P!r�r�r�rrrb�(_replace_dialog.<locals>.undo_block_stopr�r�gray)�inactiveselectbackgroundrQz"This is a sample sTring
Plus MORE.c�l:�RORQR2[R2RORQR2P!)rK)rzrrU)r�r�rs���r�show_replace�%_replace_dialog.<locals>.show_replace*s*������S�%��%���
�����U�C�(rr)r�command)�tkinterr�r�r�r��tkinter.ttkr�r�r��map�int�geometry�split�packrZrbrQ�	focus_set)�parentr�r�r�r��top�x�yrZrb�framer��buttonr�r�rs&            @@@r�_replace_dialogr�s����0�0�)�
�6�
�C��I�I�"�#��s�F�O�O�%�+�+�C�0��4�5�D�A��L�L��Q�C��L�(�)�
�
�
�#�J�E�	�J�J�L����7�D�,�D��*�D���I�I�K��K�K��>�?��N�N��)�
�E�	�<�
@�F�
�K�K�Mr�__main__)�mainzidlelib.idle_test.test_replace)�	verbosity�exit)�runr�)r�rAr�rr�idlelib.searchbaser�idlelibrrr
r�r��unittestr��idlelib.idle_test.htestr�r�rr�<module>r�s]���

�'�/� �=�$n �$�n �b�D�z����	)�Q�U�C�+����r

Youez - 2016 - github.com/yon3zu
LinuXploit