HEX
Server: Apache/2.4.65 (Unix) OpenSSL/1.1.1k
System: Linux vps109042.inmotionhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: cisa (1010)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //opt/imh/python3.13/lib/python3.13/idlelib/__pycache__/pyshell.cpython-313.pyc
�

��e����SSKr\S:Xa\RS\RS'SSK7 \RS:Xa
SS	K	J
r
 \
"5 SS
KJr SSKJ
r
 SSKrSSKrSSKrSSKrSSKJr SSKrSSKrSSKrSS
KJr SSKrSSKrSSKrSSKrSSKJr SSKJr SSK J!r! SSK"J#r# SSK"J$r$ SSK%J&r&J'r' SSK(J)r) SSK*J+r+ SSK"J,r, SSK"J-r- SSK.J/r/J0r0J1r1 SSK2J3r3 Sq4Sr5Sr6Sr7\7\8l7\7\9l7\Rq;S5Sjr<Sq=Sr>\>"S5 S\R~4S jr@\@\l?"S!S"\&5rA"S#S$\)5rB"S%S&\5rC"S'S(\35rD"S)S*\!5rE"S+S,\-R�5rGS-rH"S.S/\
5rI"S0S1\+5rJS2rKS3rLS4rM\S:Xa\M"5 \>"S5 g!\a \"S\RS9 \"S5ef=f!\:a N�f=f)6�N�__main__zidlelib.pyshell)�*zJ** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **��file��win32)�
fix_win_hidpi)�
messagebox)�InteractiveInterpreter)�python_version)�TextWrapper)�ColorDelegator)�idleConf)�	Delegator��debugger)�
debugger_r)�EditorWindow�
fixwordbreaks)�FileList)�OutputWindow)�replace)�rpc)�idle_formatwarning�StdInputFile�
StdOutputFile)�
UndoDelegatorFz	127.0.0.1zCtrl-D (end-of-file)c
��Uc[nUR[XX#US95 URS5 g![[4a gf=f)z�Show Idle-format warning (after replacing warnings.showwarning).

The differences are the formatter called, the file=None replacement,
which can be None, the capture of the consequence AttributeError,
and the output of a hard-coded prompt.
N)�linez>>> )�warning_stream�writer�AttributeError�OSError)�message�category�filename�linenorrs      �5/opt/imh/python3.13/lib/python3.13/idlelib/pyshell.py�idle_showwarningr)CsS���|���
��
�
�%��8�$�@�	A��
�
�6����G�$�
��
�s�+7�A
�	A
c��U(a([c [Rq[[lgg[b[[lSqgg)z>Replace warning.showwarning with idle_showwarning, or reverse.N)�_warnings_showwarning�warnings�showwarningr))�captures r(�capture_warningsr/VsA��� �(�$,�$8�$8�!�#3�H� �)�!�,�#8�H� �$(�!�-�Tc���[Rn0n[U5H'nUSSUSS-S:XdMURU5X4'M) U"U5 UR	U5 g)aWExtend linecache.checkcache to preserve the <pyshell#...> entries

Rather than repeating the linecache code, patch it to save the
<pyshell#...> entries, call the original linecache.checkcache()
(skipping them), and then restore the saved entries.

orig_checkcache is bound at definition time to the original
method, allowing it to be patched.
Nr����<>)�	linecache�cache�list�pop�update)r&�orig_checkcacher5�save�keys     r(�extended_linecache_checkcacher<es^��
�O�O�E�
�D��E�{���r��7�S���X���%��	�	�#��D�I���H��	�L�L��r0c�n�\rSrSrSrSr/SQrSSjrSrSSjr	SS	jr
S
rSrSr
S
rSrSrSrg)�PyShellEditorWindow�|z6Regular text edit window in IDLE, supports breakpointsc��/Ul[R"U/UQ76 URR	SUR
5 URR	SUR5 URR	SURR5 [RR[RS5UlURR U4SjnURR#U5 URR$(aUR'5 UR)5 g)N�<<set-breakpoint>>�<<clear-breakpoint>>z<<open-python-shell>>zbreakpoints.lstc�2�UR5 U"5 g�N)�restore_file_breaks)�old_hook�selfs  r(�filename_changed_hook�;PyShellEditorWindow.__init__.<locals>.filename_changed_hook�s���$�$�&��Jr0)�breakpointsr�__init__�text�bind�set_breakpoint_event�clear_breakpoint_event�flist�
open_shell�os�path�joinr�userdir�breakpointPath�io�filename_change_hook�set_filename_change_hookr&rE�color_breakpoint_text)rG�argsrHs   r(rK�PyShellEditorWindow.__init__s���������d�*�T�*��	�	���+�T�-F�-F�G��	�	���-�t�/J�/J�K��	�	���.��
�
�0E�0E�F�!�g�g�l�l�� � �"3�5���,0�7�7�+G�+G�'+�	�	
���(�(�)>�?��7�7����$�$�&��"�"�$r0))�Cutz<<cut>>�rmenu_check_cut)�Copyz<<copy>>�rmenu_check_copy)�Pastez	<<paste>>�rmenu_check_paste)NNN)zSet BreakpointrAN)zClear BreakpointrBNc���URcgU(a-[R"5n[R"US5nOSSS.nURRSU5 g)z,Turn colorizing of breakpoint text on or offN�break�)�
foreground�
background�BREAK)rWr�CurrentTheme�GetHighlightrL�
tag_config)rG�color�theme�cfgs    r(rZ�)PyShellEditorWindow.color_breakpoint_text�sO���7�7�?����)�)�+�E��'�'��w�7�C�!#�2�6�C��	�	���W�c�*r0c��URnURRnURSSU-SUS--5 URRU5 URRRRnURX15 g![a URRU5 Ndf=f! g=f)Nrhz%d.0r)
rLrWr&�tag_addrJ�index�
ValueError�appendrP�pyshell�interpr�set_breakpoint)rGr'rLr&�debugs     r(rw�"PyShellEditorWindow.set_breakpoint�s����y�y���7�7�#�#�����W�f�v�o�v����/B�C�	,����"�"�6�*�	��J�J�&�&�-�-�6�6�E�� � ��2��	�	,����#�#�F�+�	,��
	��s�B�;C�%C�?C�CNc���URnURRnU(dUR5 g[	[UR
S555nURU5 g)N�insert)rLrWr&�bell�int�floatrrrw)rG�eventrLr&r's     r(rN�(PyShellEditorWindow.set_breakpoint_event�sO���y�y���7�7�#�#����I�I�K���U�4�:�:�h�/�0�1�����F�#r0c��URnURRnU(dUR5 g[	[UR
S555nURRU5 URSSS5 URRRRnURX45 g! NT=f! g=f)Nr{rh�insert linestartzinsert lineend +1char)rLrWr&r|r}r~rrrJ�remove�
tag_removerPrurvr�clear_breakpoint)rGrrLr&r'rxs      r(rO�*PyShellEditorWindow.clear_breakpoint_event�s����y�y���7�7�#�#����I�I�K���U�4�:�:�h�/�0�1��	����#�#�F�+�	
����!3�/�	1�	��J�J�&�&�-�-�6�6�E��"�"�8�4��
	���	��s�C
�;C�
C�Cc�^�UR(a�URnURRnU(dUR	5 g/UlURSS[5 URRRRnURU5 gg! g=f)Nrh�1.0)rJrLrWr&r|r��ENDrPrurvr�clear_file_breaks)rGrLr&rxs    r(r��%PyShellEditorWindow.clear_file_breaks�s�������9�9�D��w�w�'�'�H���	�	���!�D���O�O�G�U�C�0�
��
�
�*�*�1�1�:�:���'�'��1���
��s�+;B(�(B,c�.�URnURRn[UR5nUR5nSSS5 [URS5nWH/nURUS-5(aMURU5 M1 UR5 URnU(a#URUS-[U5-S-5 SSS5 g!,(df   N�=f![a /nN�f=f!,(df   g=f![ahn[URSS5(dBSURl
[R"SS	[U5-UR S
9 SnAgSnAgSnAff=f)z#Save breakpoints when file is savedN�w�=�
�breakpoint_error_displayedFTz
IDLE Errorz$Unable to update breakpoint list:
%s)�titler$�parent)rJrWr&�openrV�	readlinesr#�
startswithr!�update_breakpoints�str�getattr�rootr�r
�	showerrorrL)rG�breaksr&�fp�lines�new_filer�errs        r(�store_file_breaks�%PyShellEditorWindow.store_file_breaks�sG��$�!�!���7�7�#�#��	��d�)�)�*�b������+�	&��d�)�)�3�/�8�!�D��?�?�8�c�>�:�:� ���t�,�"��'�'�)��)�)����N�N�8�c�>�C��K�#?�$�#F�G�0�/�+�*���	��E�	��0�/���	&��4�9�9�&B�E�J�J�7;��	�	�4��$�$�<�C��c�(�#��9�9�&�K��	&�sl�C?�C.�
C?�D"�)D�
AD�%D"�.
C<�8C?�<C?�?D�
D�
D�D"�D"�"
F�,AF�Fc��URR5 URcgURRnUcg[R
R
UR5(a�[UR5nUR5nSSS5 WHRnURUS-5(dM[U[U5S-S5nUHnURU5 M MT gg!,(df   Nh=f)Nr�r)rLr8rWr&rRrS�isfilerVr�r�r��eval�lenrw)rGr&r�r�r�breakpoint_linenumbers�breakpoint_linenumbers       r(rE�'PyShellEditorWindow.restore_file_breakss����	�	�����7�7�?���7�7�#�#�����
�7�7�>�>�$�-�-�.�.��d�)�)�*�b������+����?�?�8�c�>�2�2�-1�$�s�8�}�Q��7G�2H�-I�*�1G�-��+�+�,A�B�2H��/�*�*�s�C9�9
Dc�l�URnURS5nURU5nX0lg)z3Retrieves all the breakpoints in the current windowrhN)rL�
tag_ranges�ranges_to_linenumbersrJ)rGrL�ranges�linenumber_lists    r(r��&PyShellEditorWindow.update_breakpointss/���y�y������)���4�4�V�<��*�r0c��/n[S[U5S5Hjn[[XR55n[[XS-R55nXE:dMMURU5 US-
nXE:aMMl U$)Nr�r)�ranger�r}r~�stringrt)rGr�r�rrr'�ends      r(r��)PyShellEditorWindow.ranges_to_linenumbers#sx�����1�c�&�k�1�-�E���v�}�3�3�4�5�F��e�F��7�O�2�2�3�4�C��,����V�$��!����,�.��r0c�P�UR5 [R"U5 g)z7Extend base method - clear breaks when module is closedN)r�r�_close�rGs r(r��PyShellEditorWindow._close4s����� ����D�!r0)rVrJ)TrD)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rK�rmenu_specsrZrwrNrOr�r�rEr�r�r��__static_attributes__�r0r(r>r>|sE��<�%�(�K�
+��$��&
�(&�TC�"+��""r0r>c�*�\rSrSrSr\rSrSSjrSr	g)�PyShellFileListi:z8Extend base class: IDLE supports a shell and breakpointsNc��UR(a0URRR5 UR$[U5UlUR(a URR	5(dgUR$rD)ru�top�wakeup�PyShell�begin�rGrs  r(rQ�PyShellFileList.open_shellCs_���<�<��L�L���#�#�%��|�|��	#�4�=�D�L��|�|��|�|�)�)�+�+���|�|�r0)rurD)
r�r�r�r�r�r>rrurQr�r�r0r(r�r�:s��>�'�L��G�r0r�c�$�\rSrSrSrSrSrSrg)�ModifiedColorDelegatoriNz8Extend base class: colorizer for the shell window itselfc�|�URSSS5 URSSS5 [R"U5 g)N�TODOr��iomark�SYNC)r�rqr�recolorize_mainr�s r(r��&ModifiedColorDelegator.recolorize_mainPs0�������x�0����V�U�H�-��&�&�t�,r0c�P�URHnURUSS5 M g)Nr�r�)�tagdefsr�)rG�tags  r(�removecolors�#ModifiedColorDelegator.removecolorsUs ���<�<�C��O�O�C��5�1� r0r�N)r�r�r�r�r�r�r�r�r�r0r(r�r�Ns��>�-�
2r0r�c�@^�\rSrSrSrSSjrSSjrU4SjrSrU=r	$)�ModifiedUndoDelegatori[z;Extend base class: forbid insert/delete before the I/O markc���URRUSS5(aURR5 g[R
"XX#5 g![a N$f=f�N�<r�)�delegate�comparer|�TclErrorrr{�rGrr�chars�tagss    r(r{�ModifiedUndoDelegator.insert]s^��	��}�}�$�$�U�C��:�:��
�
�"�"�$��;�
	���T�%�6���	��	���<A�
A%�$A%c���URRUSS5(aURR5 g[R
"XU5 g![a N$f=fr�)r�r�r|r�r�delete)rG�index1�index2s   r(r��ModifiedUndoDelegator.deletefs^��	��}�}�$�$�V�S�(�;�;��
�
�"�"�$��<�
	���T�6�2���	��	�r�c��>^�URRmU4SjURl[TU]
U5 TURlg!TURlf=f)Nc�>�T"XS5$�N�stdinr�)rrr��orig_inserts  �r(�<lambda>�2ModifiedUndoDelegator.undo_event.<locals>.<lambda>vs����U�7�!Cr0)r�r{�super�
undo_event)rGrr��	__class__s  @�r(r�� ModifiedUndoDelegator.undo_eventosN���
�m�m�*�*��C�	
�
�
��	/��G��u�%�#.�D�M�M� ��;�D�M�M� �s�A�A#r�rD)
r�r�r�r�r�r{r�r�r��
__classcell__�r�s@r(r�r�[s���A�7�3�/�/r0r�c�"�\rSrSrSrSSjrSrg)�UserInputTaggingDelegatori}z.Delegator used to tag user input with "stdin".Nc�F�UcSnURRXU5 gr�)r�r{r�s    r(r{� UserInputTaggingDelegator.inserts ���<��D��
�
���U�4�0r0r�rD)r�r�r�r�r�r{r�r�r0r(r�r�}s
��8�1r0r�c��\rSrSrSrSrg)�MyRPCClienti�c��[e)z0Override the base class - just re-raise EOFError)�EOFErrorr�s r(�
handle_EOF�MyRPCClient.handle_EOF�s���r0r�N)r�r�r�r�r�r�r�r0r(r�r��s��r0r�c��SU=(d SS3nU[U5:�a*[U[U5-
S5up4X4-S-UUS-3$USS$)z�Return width long restart line formatted with filename.

Fill line with balanced '='s, with any extras and at least one at
the beginning.  Do not end with a trailing space.
z= RESTART: �Shellz =r�r�N���)r��divmod)�widthr&r��div�mods     r(�restart_liner�sb��
��+�G�,�B�
/�C���C����5�#�c�(�?�Q�/����7�C�-����c�#�g�Y�/�/��3�B�x�r0c���\rSrSrSrSrSrSrSrSr	Sr
S"SjrSrS	r
S
rSrS#SjrSrS
rSrSrSrSrSrSrSrS$SjrSrSrSrS$SjrSrSr Sr!Sr"Sr#Sr$Sr%S r&S!r'g)%�ModifiedInterpreteri�c���Xl[RSRn[R
"XS9 SUlSUl[Ul	URRRUl
g)Nr)�localsF)�	tkconsole�sys�modules�__dict__rrK�
restarting�subprocess_arglist�PORT�port�compile�compiler�flags�original_compiler_flags)rGrrs   r(rK�ModifiedInterpreter.__init__�sW��"�����Z�(�1�1���'�'��<����"&�����	�'+�|�|�'<�'<�'B�'B��$r0Nc��URcUR5Ul[[RSS9n[
R"URUS9Ulg)N�dumb)�TERM)�env)r�build_subprocess_arglist�dictrR�environ�
subprocess�Popen�
rpcsubproc)rGrs  r(�spawn_subprocess�$ModifiedInterpreter.spawn_subprocess�sI���"�"�*�&*�&C�&C�&E�D�#��2�:�:�F�+��$�*�*�4�+B�+B��L��r0c��URS:wdS5e[RVs/sHnSU-PM
 nn[R"SSSSSS	9nS
U<S3n[R
/U-SU[
UR5/-$s snf)
Nrz/Socket should have been assigned a port number.z-W�main�Generalzdelete-exitfuncF�bool)�default�typez#__import__('idlelib.run').run.main(�)�-c)rr
�warnoptionsr�	GetOption�
executabler�)rG�sr��	del_exitf�commands     r(r�,ModifiedInterpreter.build_subprocess_arglist�s����	�	�1��	?�=�	?��"���/��!�T�A�X���/��&�&�v�y�:K�/4�6�C�	�7�	�}�A�F������!�#�t�W�c�$�)�)�n�&E�E�E��
0s�Bc�J�[UR4n[S5H*n[R"U5 [U5Ul O UR5 gURRR5SUl[S:waCURRR[R[RS5 UR!5 URRR#S5 URR%5 URR+SUR,5 URR+SUR,R.5 URR+SUR,R05 URR+SUR,R25 URR+S	UR,R45 URR+S
[65 URR+SU5 UR9SS
9 UR;5 UR$![a GMcf=f![&a UR)5 gf=f)N�rr�
�consoler��stdout�stderrrPr4rvT��with_cwd)�HOSTrr��time�sleepr��rpccltr#�display_port_binding_error�listening_sock�getsocknamer�
setsockopt�socket�
SOL_SOCKET�SO_REUSEADDRr#�
settimeout�accept�TimeoutError�display_no_subprocess_error�registerrr�r8r9rPr4�
transfer_path�poll_subprocess)rG�addr�is   r(�start_subprocess�$ModifiedInterpreter.start_subprocess�s����d�i�i� ���q��A��J�J�q�M�
�)�$�/����	�
�+�+�-���K�K�.�.�:�:�<�Q�?��	��1�9�

�K�K�&�&�1�1�&�2C�2C�+1�+>�+>��
C�����	
���"�"�-�-�b�1�	��K�K��� �	
�����Y����7������W�d�n�n�&:�&:�;������X�t�~�~�'<�'<�=������X�t�~�~�'<�'<�=������W�d�n�n�&:�&:�;������[�)�4������X�t�,����D��)������{�{���C�
��
��*�	��,�,�.��	�s#�I3�J�3
J�J�J"�!J"c�P�UR(aUR$SUlUR5nU(a![R"UR5 URR5 UR
5 URnURnSUlUR5 URR5 URUS9 UR5 URR!SS5 UR#S5 UR#[%UR&U55 URR)SS5 URR+SS5 U(dUR-5 U(a0[R."UR5 UR15 UR2UR4R6lSUlUR$! GN�=f![a UR5 gf=f)	NTFr:r��end-1cr��restart�left)rr?�getdebuggerr�close_subprocess_debugger�close�terminate_subprocessr�	executingr#rHrIrJrL�
stop_readlinerLr�r!rr�mark_set�mark_gravity�
showprompt�restart_subprocess_debugger�load_breakpointsrrrr)rGr;r&rxr7�
was_executings      r(�restart_subprocess�&ModifiedInterpreter.restart_subprocess�s����?�?��;�;������ � �"���
��4�4�T�[�[�A�	
�������!�!�#��.�.���)�)�
�!�������	��K�K��� �	
���H��-����������H�h�/��
�
�d���
�
�l�7�=�=�(�;�<������i��2����!�!�)�V�4����� ���2�2�4�;�;�?��"�"�$�&*�&B�&B������#�����{�{���A
����	��,�,�.��	�s� H�7H�H�H%�$H%c�@�URRSSS05 g)N�exec�interrupt_the_serverr�)r?�
remotecallr�s r(�__request_interrupt�'ModifiedInterpreter.__request_interrupts�������v�'=�r�2�Fr0c�\�[R"URS9R5 g)N)�target)�	threading�Thread�'_ModifiedInterpreter__request_interrupt�startr�s r(�interrupt_subprocess�(ModifiedInterpreter.interrupt_subprocesss������ 8� 8�9�?�?�Ar0c��URb/URRRUR5 URR
R
5 URR
5 UR5 SURl	SUlg![a NPf=f![a NEf=f)NF)
�_afteridrrL�after_cancelr?rArXr"rYrZr�s r(�kill_subprocess�#ModifiedInterpreter.kill_subprocesss����=�=�$��N�N���,�,�T�]�]�;�	��K�K�&�&�,�,�.�	��K�K����	
�!�!�#�#(���� ������	��	���	��	�s#�$B&�#B6�&
B3�2B3�6
C�Cc��URR5 URR5 g![a gf=f![a gf=f)z"Make sure subprocess is terminatedN)r"�kill�waitr#r�s r(rY�(ModifiedInterpreter.terminate_subprocess'sQ��		��O�O� � �"�

����$�$�&���
��
��
�	��	�s �A�8�
A�A�
A�Ac��U(a#S/nUR[R5 O[RnURSR	U55 g)NrezTif 1:
        import sys as _sys
        _sys.path = {!r}
        del _sys
        
)�extendr
rS�
runcommand�format)rGr;rSs   r(rL�!ModifiedInterpreter.transfer_path4sA����4�D��K�K����!��8�8�D������f�T�l�		r0c��URnUcgURURSS9nU(a�URR5 SUlUup4URRnUS:XaUb[[U5US9 OaUS:Xa1URRS5(aUR5 O*US:Xa$Sn[Xd[R S9 [XdUS9 URR#5 URR(dJURR&R)URR*UR,5Ulgg![[[
4a3 URR(agSnUR5 GN�f=f![$a N�f=f)	Ng�������?)ry�OKr�	EXCEPTION�<<toggle-jit-stack-viewer>>�ERRORz/pyshell.ModifiedInterpreter: Subprocess ERROR:
)r?�pollresponse�
active_seqr�r#�KeyboardInterruptr�closingrb�resetoutputr7�print�repr�getvar�remote_stack_viewerr
�
__stderr__�endexecutingr"rL�after�pollintervalrMrs)rG�clt�response�how�whatr7�errmsgs       r(rM�#ModifiedInterpreter.poll_subprocessCsx���k�k���;��	&��'�'����d�'�C�H���N�N�&�&�(�"�D�O� �I�C��n�n�,�,�G��d�{��#��$�t�*�7�3����#��>�>�(�(�)F�G�G��,�,�.�����K���f����8��f��1�
����+�+�-��~�~�%�%� �N�N�/�/�5�5����+�+�T�-A�-A�C�D�M�&��9�'�#4�5�	&��~�~�%�%���H��#�#�%�
	&��2"�
��
�s)�E-�-F8�-0F5�F5�4F5�8
G�Gc��XlgrDr)rGrs  r(�setdebugger�ModifiedInterpreter.setdebuggerks�� �
r0c��UR$rDrr�s r(rV�ModifiedInterpreter.getdebuggerns���}�}�r0c�d�URRRSUR5 g)abInitiate the remote stack viewer from a separate thread.

This method is called from the subprocess, and by returning from this
method we allow the subprocess to unblock.  After a bit the shell
requests the subprocess to open the remote stack viewer which returns a
static object looking at the last exception.  It is queried through
the RPC mechanism.

i,N)rrLr�r�r�s r(�open_remote_stack_viewer�,ModifiedInterpreter.open_remote_stack_viewerqs'��	
�����!�!�#�t�'?�'?�@�r0c�
�SSKJn URRSSS05nUc%URR
R
5 gURURU5nSSKJ	nJ
n [URR
5n[R"5n[R"US5SnU"XhSS	9n	U	RR!S
SS9 U"U	R"SU5n
U
R%5 g)
Nr)�
debugobj_rre�stackviewer)rP)�ScrolledCanvas�TreeNode�normalrg)�bg�highlightthicknessr�both)�expand�fill)�idlelibr�r?�remotequeuerr�r|�StubObjectTreeItem�idlelib.treer�r��Toplevelrrirj�frame�pack�canvasr�)rGr��oid�itemr�r�r�rmrg�sc�nodes           r(r��'ModifiedInterpreter.remote_stack_viewer~s���&��k�k�%�%�f�m�Z��L���;��N�N���$�$�&���,�,�T�[�[�#�>��9��t�~�~�*�*�+���%�%�'���*�*�5�(�;�L�I�
�
�C�1�
E��
���
�
�Q�V�
�,���	�	�4��.�����
r0rc�H�URU5nURX!5 g)z1Like runsource() but assumes complete exec sourceN)�stuffsource�execfile�rG�sourcer&s   r(�
execsource�ModifiedInterpreter.execsource�s���#�#�F�+���
�
�h�'r0c�*�Ucc[R"U5nUR5n[(a)S[R
R
U5S3U-S-nSSS5 [X!S5nURU5 g!,(df   N-=f![[4ak URR5 [SURRS9 [R "X5 URR#5 gf=f)zExecute an existing fileNz__file__ = r'''z'''
z
del __file__rezB*** Error in script or command!
Traceback (most recent call last):r)�tokenizer��read�use_subprocessrRrS�abspathr�runcode�
OverflowError�SyntaxErrorrr�r�r9r�showsyntaxerrorr^)rGr&r�r��codes     r(r��ModifiedInterpreter.execfile�s����>����x�(�B������!�>� /�������0I�/J�%�P� &�'�)9�:�F�)�

	��6�V�4�D�
�L�L���)�(���{�+�	(��N�N�&�&�(��6��~�~�,�,�
.�
#�2�2�4�B��N�N�%�%�'�
	(�s�AB�(B�
B�A8D�Dc��URU5n[U[5(de[R"XU5$)zBExtend base class method: Stuff the source in the line cache first)r��
isinstancer�r�	runsourcer�s   r(r��ModifiedInterpreter.runsource�s:���#�#�F�+���&�#�&�&�&�&�&�/�/��h�G�Gr0c��SUR-nURS-UlURS5n[U5S-SX24[RU'U$)z"Stuff source in the filename cachez<pyshell#%d>rr�r)�gid�splitr�r4r5)rGr�r&r�s    r(r��ModifiedInterpreter.stuffsource�sO��!�D�H�H�,���8�8�a�<������T�"��$'��K��M�1�e�$E�	����!��r0c�D�URSRU55 g)z>Prepend sys.path with file's directory if not already includeda*if 1:
            _filename = {!r}
            import sys as _sys
            from os.path import dirname as _dirname
            _dir = _dirname(_filename)
            if not _dir in _sys.path:
                _sys.path.insert(0, _dir)
            del _filename, _sys, _dirname, _dir
            
N)r}r~�rGr&s  r(�prepend_syspath�#ModifiedInterpreter.prepend_syspath�s�������&��"�	$r0c��URnURnURSSS5 [R"5upVn[USS5=(d U=(d Sn[USS5=(d Sn	[US	S5=(d S
n
U
S
:XaU	S-
n	U	S:Xa	SU
S-
-nO
SU	S-
U
S-
4-nUR
XK5 UR5 URS
U-5 UR5 g)z�Override Interactive Interpreter method: Use Colorizing

Color the offending position instead of printing it and pointing at it
with a caret.

r�r�r��msgrez<no detail available>r'r�offsetrziomark + %d charsz&iomark linestart + %d lines + %d charszSyntaxError: %s
N)
rrLr�r
�exc_infor��colorize_syntax_errorr�r!r^)rGr&�kwargsrrLr*�value�tbr�r'r��poss            r(r��#ModifiedInterpreter.showsyntaxerror�s����N�N�	��~�~��������.��,�,�.���R��e�U�B�'�K�5�K�4K�����"�-�2������"�-�2����Q�;��a�K�F��Q�;�%����2�C�:��!�8�V�A�X�&�'�C��'�'��2������
�
�&��,�-����r0c��URR5 UR5 [R"U5 URRS5(aURR
5 gg)z1Extend base class method to reset output properlyr�N)rr��checklinecacher�
showtracebackr��open_stack_viewerr�s r(r��!ModifiedInterpreter.showtraceback�sX�����"�"�$������,�,�T�2��>�>� � �!>�?�?��N�N�,�,�.�@r0c�n�[Rn[U5HnUSSUSS-S:wdMX	M g)z%Remove keys other than '<pyshell#n>'.Nrr2r3)r4r5r6)rGr5r;s   r(r��"ModifiedInterpreter.checklinecache�s7��������;�C��2�A�w��R�S��!�T�)��J�r0c���URR(aUR5 gUR(a URR	SSU405 g[XR5 g)z*Run the code without invoking the debuggerrrer�r)rrZ�display_executing_dialogr?r�rer)rGr�s  r(r}�ModifiedInterpreter.runcommand�sW���>�>�#�#��)�)�+���;�;��K�K�#�#�F�I��w��C��
��{�{�#�r0c���URR(aUR5 UR5 URnURR5 U(d2URb%URRSSU405UlO:U(aUR"XR5 O[XR5 [$(dURR+5 gg![a` URR(dC[R"SSSURR S9(aeUR#5 N�e [$(aJ['SURR(S	9 UR#5 URR+5 N�URR,(a2S
URl['SURR(S	9 GN4UR#5 GNG=f![.a gf=f![$(d,URR+5 f![.a ff=ff=f)�Override base class methodNrer�zExit?zDo you want to exit altogether?�yes�r)r�z IDLE internal error in runcode()rFr�)rrZrbr�r�beginexecutingr?�
asyncqueuer��runrre�
SystemExitr�r
�askyesnorLr�r�r�r9r��canceledr")rGr�rs   r(r��ModifiedInterpreter.runcode�s����>�>�#�#��#�#�%������=�=��&	��N�N�)�)�+����� 7�"&�+�+�"8�"8���9=���#E�������T�;�;�/��T�;�;�'�4"�>���N�N�/�/�1�"��3�	��>�>�)�)��&�&��5�!��>�>�.�.�	0�
��&�&�(��	)��~��8��>�>�0�0�2��"�"�$����+�+�-��>�>�*�*�.3�D�N�N�+��-�D�N�N�4I�4I�J��&�&�(��
&�����"�>���N�N�/�/�1��%�����"�s��	AC>�H0�#C>�?H0�C>�H0�"H �>A&H�$H0�&AH�;H0�=A
H�H0�
H�H0� 
H-�,H-�0I)�=I�I)�
I%�"I)�$I%�%I)c�L�URRRU5$)r�)rr9r!)rGr0s  r(r!�ModifiedInterpreter.write*s���~�~�$�$�*�*�1�-�-r0c�X�[R"SSURRS9 g)NzPort Binding ErroraAIDLE can't bind to a TCP/IP port, which is necessary to communicate with its Python execution server.  This might be because no networking is installed on this computer.  Run IDLE with the -n command line switch to start without a subprocess and refer to Help/IDLE Help 'Running without a subprocess' for further details.�r��r
r�rrLr�s r(r@�.ModifiedInterpreter.display_port_binding_error.s'����� �
/��>�>�&�&�	(r0c�X�[R"SSURRS9 g)NzSubprocess Connection Errorz�IDLE's subprocess didn't make connection.
See the 'Startup failure' section of the IDLE doc, online at
https://docs.python.org/3/library/idle.html#startup-failurer�r�r�s r(rJ�/ModifiedInterpreter.display_no_subprocess_error9s(�����)�
J��>�>�&�&�	(r0c�X�[R"SSURRS9 g)NzAlready executingzYThe Python Shell window is already executing a command; please wait until it is finished.r�r�r�s r(r��,ModifiedInterpreter.display_executing_dialogAs%������
0��>�>�&�&�		(r0)rsr�rr�rrrr?r"rr)Fre)FrD)(r�r�r�r�rKrsr?r"r#rrPrbrnrprurYrLr�rMrr�rVr�r�r�r�r�r�r�r�r�r�r�r}r�r!r@rJr�r�r�r0r(r	r	�s���C��H�
�F��J�M�
F�)�V*�XG�B�
����J�$C�L�H�!����"�C�(�
�(H��
$��4/��
�,�\.�	(�(�(r0r	c	�t^�\rSrSrSSKJr S\"5-r\r	\
r/SQr\
RS/-rS\"\"\R$"S\555-r\R)\S	5 CS
rSrSSKJr SS
KJr S;SjrU4SjrU4SjrSrSrSr S;Sjr!S
r"S
r#S
r$S
r%S
r&S
r'Sr(Sr)S;Sjr*Sr+S;Sjr,Sr-Sr.Sr/Sr0Sr1Sr2S r3S!r4S"r5S#r6S$r7S%r8S&r9S'r:S;S(jr;S)r<S*r=S+r>S,r?\@R�"S-5rBS.rCS;S/jrDS;S0jrES;S1jrFS2rGS3rHS4rIS<S5jrJU4S6jrKU4S7jrLS;S8jrMS9rNS:rOU=rP$)=r�iIr)�SqueezerzIDLE Shell ))r�_File)�edit�_Edit)rx�_Debug)�options�_Options)�window�_Window)�help�_Help)�Squeeze�<<squeeze-current-text>>rc��USS:g$)Nrr_r�)�
rmenu_items r(r��PyShell.<lambda>as
��:�a�=�F�2r0)zCopy with prompts�<<copy-with-prompts>>r`Fr�)�History)�ShellSidebarc�	�URnUSSS:waURSS5 [U5UlUc0[	5n[U5 UR
5 [U5nSUl[R"XSS5 SUlSUl[[S5(a[ROSUlUR R#S	5S
UlUR UlUR(nUR+SS9 UR-S
UR.5 UR-SUR05 UR-SUR25 UR-SUR45 UR-SUR65 UR-SUR85 UR-SUR:5 UR-SUR<5 [>(a8UR-SUR@5 UR-SURB5 UREU5Ul#UR-SURH5 [RJUl&[RNUl([RRUl*SSK+J,n [[USUR\UR^5Ul)[aUSUR\UR^5Ul%[aUSUR\S5Ul'[aUSUR\UR^5Ul1[>(d?URJ[l%URN[l'URR[l)SSK2nURfUl4URmUR(5Ul7SUl8URsU5UlURtRvRUR(lURtRy[{55 [>(d'UR}SSS5 UR}SS S5 gg! [Rj[l'e=f)!Nr�r�shell)r�She_llF��ps1z>>>
r�r2�char)�wrapz<<newline-and-indent>>z<<plain-newline-and-indent>>z<<interrupt-execution>>z<<end-of-file>>z<<open-stack-viewer>>�<<toggle-debugger>>r�rz<<view-restart>>z<<restart-shell>>r)�iomenur�r8r9�backslashreplacer7�2�disabledr)?�
menu_specsr{r	rv�Tkr�withdrawr��
shell_sidebarrrK�usetabs�indentwidth�hasattrr
r�sys_ps1r��prompt_last_line�promptrL�	configurerM�enter_callback�linefeed_callback�cancel_callback�eof_callbackr��toggle_debugger�toggle_jit_stack_viewer�copy_with_prompts_callbackr��view_restart_mark�
restart_shellr�squeezer�squeeze_current_text_eventr8�save_stdoutr9�save_stderrr��
save_stdinr�rr�encoding�errorsrr7�pydoc�
plainpager�pagerr�r�historyr�r�perr��insertfilterr��update_menu_state)rGrP�msr�rLrr:s       r(rK�PyShell.__init__osZ��
�_�_��
�a�5��8�w���I�I�a�,�-�)�$�/����=��4�D��$���M�M�O�#�D�)�E�!������d�4��6�������")�#�u�"5�"5�s�w�w�7��� $��� 2� 2�4� 8�� <����l�l����y�y�����F��#��	�	�*�D�,?�,?�@��	�	�0�$�2H�2H�I��	�	�+�T�-A�-A�B��	�	�#�T�%6�%6�7��	�	�)�4�+A�+A�B��	�	�'��)=�)=�>��	�	�/��1M�1M�N��	�	�)�4�+J�+J�K��>��I�I�(�$�*@�*@�A��I�I�)�4�+=�+=�>��
�
�d�+��
��	�	�,��1�1�	3��:�:����:�:����)�)���"�!�$��"(�/�/�6�=�=�B��
�#�D�(�$*�O�O�V�]�]�D���#�D�(�$*�O�O�5G�I���$�T�9�%+�_�_�f�m�m�E����~����C�J����C�J��
�
�C�I�	���*�*�E�K�
�|�|�D�I�I�.������!�.�.�t�4���
 �8�8�<�<�.�.��	�	�������7�9�:��~��"�"�7�A�z�:��"�"�7�A�z�:���!	����C�J��s�
Q$�$Rc�r>�[TU]5 URbURR5 ggrD)r��	ResetFontr"�update_font�rGr�s �r(rD�PyShell.ResetFont�s1���
�������)����*�*�,�*r0c�>�[TU]5 [R"5nSSS.[R"US5[R"US5[R"US5S.nUR5H"up4URR"U40UD6 M$ URbURR5 gg)N)rgrfr8r9r�)r�r8r9r7)
r��ResetColorizerrrirj�itemsrL�
tag_configurer"�
update_colors)rGrm�
tag_colorsr��tag_colors_configr�s     �r(rI�PyShell.ResetColorizer�s����
��� ��%�%�'��"&�d�;��)�)�%��:��)�)�%��:��*�*�5�(�;�	
�
�'1�&6�&6�&8�"�C��I�I�#�#�C�=�+<�=�'9����)����,�,�.�*r0c�B�[R"URSS9 g)Nr�)�insert_tagsrd)rrLr�s  r(�
replace_event�PyShell.replace_event�s������	�	�w�7�r0c�*�[R"SS9$)NT)�
shell_only)r�
GetExtensionsr�s r(�get_standard_extension_names�$PyShell.get_standard_extension_names�s���%�%��6�6r0c�p�URRX5n[[[	U55[[	U555nUVs/sH(nUR
RRU5PM* nnSRS[XcR5555S-$s snf)z6Return text between first and last with prompts added.r�c3�># �UHupUcUOUSU3v� M g7f)N� r�)�.0r(rs   r(�	<genexpr>�*PyShell.get_prompt_text.<locals>.<genexpr>�s-���
� ?����N�D�6�(�!�D�6�(:�:� ?�s�)
rL�getr�r}r~r"�line_promptsrT�zip�
splitlines)rG�first�lastrL�lineno_ranger'�promptss       r(�get_prompt_text�PyShell.get_prompt_text�s����y�y�}�}�U�)�����e�����d�����'�
�&��
���+�+�/�/��7�&�	�
��y�y�
� #�G�_�_�->� ?�
�
�
��	��	
s�/B3c��URnURS5nUcgURS5nUSS:waURS5nUR5 URX45nUR	U5 g)z�Copy selected lines to the clipboard, with prompts.

This makes the copied text useful for doc-tests and interactive
shell code examples.

This always copies entire lines, even if only part of the first
and/or last lines is selected.
zsel.first linestartN�sel.lastr2�0zsel.last+1line linestart)rLrr�clipboard_clearrg�clipboard_append)rGrrL�selfirst�sellast�prompt_texts      r(r0�"PyShell.copy_with_prompts_callback�sx���y�y���:�:�3�4������*�*�Z�(���2�;�#���j�j�!;�<�G������*�*�8�=�����k�*r0c��UqgrD�r )rG�streams  r(�set_warning_stream�PyShell.set_warning_stream
s���r0c��[$rDrsr�s r(�get_warning_stream�PyShell.get_warning_streams���r0c��UR(a1[R"SSURS9 UR	5 gUR
R
5nU(aUR5 gUR5 g)NzDon't debug nowz*You can only toggle the debugger when idler�rd)	rZr
r�rL�set_debugger_indicatorrvrV�close_debugger�
open_debugger)rGr�dbs   r(r.�PyShell.toggle_debuggersb���>�>�� � �!2�<��y�y�
"�
�'�'�)�����(�(�*�B���#�#�%��"�"�$r0c�d�URR5nURSU(5 g)Nr)rvrV�setvar�rGr~s  r(r{�PyShell.set_debugger_indicators%��
�[�[�
$�
$�
&�����)�2�v�6r0c��grDr�r�s  r(r/�PyShell.toggle_jit_stack_viewer#s��r0c���URR5nU(a�URRS5 UR5 URR(a*[
R"URR5 UR5 URRS5 URUlUR5 UR5 g)Nz[DEBUG OFF]
)rvrVr�rXr?r�close_remote_debuggerr�r7r!r&r(r^r{r�s  r(r|�PyShell.close_debugger&s���
�[�[�
$�
$�
&��
��K�K�#�#�D�)��H�H�J��{�{�!�!��0�0����1C�1C�D������L�L����/��,�,�D�K��O�O���#�#�%r0c�|�URR(a,[R"URRU5nO[R
"U5nURR
U5 UR5 SUR-Ul	UR5 UR5 g)Nz[DEBUG ON]
)rvr?r�start_remote_debuggerr�Debuggerr�r`r&r(r^r{)rG�dbg_guis  r(r}�PyShell.open_debugger3s����;�;��� �6�6�t�{�{�7I�7I�;?�A�G��'�'��-�G�������(�� � �"�$�t�|�|�3��������#�#�%r0c�T�UR(aSOSnURSSU5 g)Nrr�rxz*tack*iewer)rZr@)rG�states  r(�debug_menu_postcommand�PyShell.debug_menu_postcommand?s!��"�n�n�
�(�����w�
�u�=r0c�2�UR5 SUlg)�Helper for ModifiedInterpreterTN)r�rZr�s r(r��PyShell.beginexecutingCs��������r0c�@�SUlSUlUR5 g)r�FN)rZr�r^r�s r(r��PyShell.endexecutingHs�������
����r0c���UR(a'[R"SSSURS9nUSLagUR	5 SUlSUl[R"U5$)zExtend EditorWindow.close()zKill?z7Your program is still running!
 Do you want to kill it?�okr�F�cancelT)	rZr
�askokcancelrLr[r�r�rrX)rGr�s  r(rX�
PyShell.closeNsa���>�>�!�-�-��J���y�y�	"�H�
�5� ��������
�����!�!�$�'�'r0c�d�UR5 [(aURR5 UR[
lUR[
lUR[
l
SUlSUlSURl
SUl[R "U5 g)zEExtend EditorWindow._close(), shut down debugger and execution serverN)r|r�rvrur5r
r8r6r9r7r�r7rPrur=rr�r�s r(r��PyShell._close]sw�������>��K�K�'�'�)��%�%��
��%�%��
��O�O��	�������!��
�
��������D�!r0c��g)z8Override EditorWindow method: never remove the colorizerTr�r�s  r(�ispythonsource�PyShell.ispythonsourcems��r0c��UR$rD)�shell_titler�s r(�short_title�PyShell.short_titleqs�����r0z>Enter "help" below or click "Help" above for more information.c
��URRSS5 UR5 [(a5SnURR5nU(dUR
5 gOSn[R[lURS[R<S[R<SUR<SU<35 URR5 UR5 S	SKnS
UlSUlg
)Nr�r{reFz�==== No Subprocess ====

WARNING: Running IDLE without a Subprocess is deprecated
and will be removed in a later version. See Help/IDLE Help
for details.

zPython z on r�rT)rLr\r�r�rvrPrXr�displayhookr
r!�version�platform�
SPLASHLINE�focus_forcer^�tkinter�_support_default_root�
_default_root)rG�nosub�clientr�s    r(r��
PyShell.beginvs����	�	���8�X�.������>��E��[�[�1�1�3�F���
�
����'�E�"�o�o�C�O��
�
��K�K����t����G�	H��	�	���������(,��%� $���r0c�j�UR(dgSUlURR5 g�NT)�reading�_stop_readline_flagr��quitr�s r(r[�PyShell.stop_readline�s!���|�|��#'�� ����
�
�r0c��URnSUlURR5 XlUR(aSUlgURRSS5n[
U5S:XaSnUR5 UR(aSUl[(d[eUR(a	SUlSnU$!Xlf=f)NTFrer�rSrr�)r�r��mainloopr�rLr_r�r�r�r�r��	endoffile)rGr:rs   r(�readline�PyShell.readline�s����|�|��	 ��D�L��H�H�����L��#�#�',�D�$���y�y�}�}�X�x�0���t�9��>��D������=�=�!�D�M�!�>�'�'��>�>�"�D�N��D���� �L�s�!C�Cc��gr�r�r�s r(�isatty�PyShell.isatty�s��r0c��URRSSS5(agUR(dMUR(d<UR	5 UR
R
S5 UR5 gSUlSUl	UR(aoUR
R(aTUR
R5(aUR
R5 OUR
R5 UR(aURR5 g! GN=f)N�	sel.firstz!=rjzKeyboardInterrupt
rdFT)rLr�rZr�r�rvr!r^r�r�r?rVrbrpr�r�r�s  r(r,�PyShell.cancel_callback�s���	��y�y� � ��d�J�?�?��@����$�,�,������K�K���3�4��O�O��������
��N�N�t�{�{�1�1��{�{�&�&�(�(����.�.�0����0�0�2��<�<��H�H�M�M�O���!	��s�"D>�>Ec��UR(aUR(dgURRSSS5(a"URRSSS5(dgUR(d!UR	5 UR5 gSUlSUlURR5 g)Nr�z==r{rSFTrd)
rZr�rLr�r�rXr�r�r�r�r�s  r(r-�PyShell.eof_callback�s����>�>�$�,�,���	�	�!�!�(�D�(�;�;��	�	�!�!�(�D�(�;�;���~�~������J�J�L�
�"�D�M�!�D�N��H�H�M�M�O�r0c��UR(a8URRSS5 URRS5 gUR	U5 g)Nr{r�rd)r�rLr{�see�newline_and_indent_eventr�s  r(r+�PyShell.linefeed_callback�sE���<�<��I�I���X�t�,��I�I�M�M�(�#��
�)�)�%�0�r0c�Z
�UR(aUR(dgURRSS5nU(a4URR	SSS5(aURX!5 gURR	SSS5(Ga�URR
S	S5nU(Ga>URR	SSUS
5(GaSURRS5;a�URR
SS5nU(a2URR	US
SUS
5(a
US
US
4nURRSS5nU(aNURR	US
SUS
5(a&US
URRUS
S-54nURURRUS
US
5U5 gURRS	S5nU(a�URR	SSUS
5(a�URRSS5nU(aNURR	US
SUS
5(a&US
URRUS
S-54nURURRUS
US
5U5 gURRSS5nU(aUURR	US
SS5(a0URURRUS
S5U5 gURURRSS5U5 gURR	SSS5(aURRSS5 URRSS5nU(a1UR5(dURRSS5 URR	SSS5(aURU5 gURRSS5 UR(a8URRSS5 URRS5 OURU5 URR!5 UR(aUR"R%5 gUR'5 g! GN�=f)Nr�rjz<=r�rdr{r��iomark linestartr�rr7z>=rz+1czinsert lineendr�rSzend-1c linestartr�)rZr�rLr_r��recall�
tag_prevrange�	tag_names�
tag_nextrangerrr\�stripr�r�r{r��update_idletasksr�r��runit)	rGr�sel�prev�	prev_cons�	next_cons�next�indicesr0s	         r(r*�PyShell.enter_callback�s����>�>�$�,�,��	��)�)�-�-��Z�8�C���9�9�$�$�Z��x�@�@��K�K��+�"��9�9���X�s�,>�?�?�
�9�9�*�*�7�H�=�D���I�I�%�%�h��T�!�W�=�=��T�Y�Y�%8�%8��%B�B� �I�I�3�3�I�x�H�	�����!2�!2�9�Q�<��t�A�w�!O�!O�%�a�L�$�q�'�2�D� �I�I�3�3�I�x�H�	�����!2�!2�9�Q�<��d�1�g�!N�!N� ��G�T�Y�Y�_�_�Y�q�\�E�5I�%J�K�D����D�I�I�M�M�$�q�'�4��7�;�U�C���9�9�*�*�7�H�=�D���	�	�)�)�*:�D�$�q�'�J�J� �I�I�3�3�I�?O�P�	�����!2�!2�9�Q�<��d�1�g�!N�!N� ��G�T�Y�Y�_�_�Y�q�\�E�5I�%J�K�D����D�I�I�M�M�$�q�'�4��7�;�U�C���i�i�-�-�i�9K�L�G���y�y� � ����T�3E�F�F����D�I�I�M�M�'�!�*�6F�G��O�����D�I�I�M�M�*<�>N�O�QV�W���9�9���X�s�H�5�5��I�I���x��2�
�I�I�M�M�(�H�-���Q�W�W�Y�Y��I�I���X�x�0��9�9���X�s�,>�?�?��)�)�%�0���	�	���8�X�.��<�<��I�I���X�t�,��I�I�M�M�(�#��)�)�%�0��	�	�"�"�$��<�<��H�H�M�M�O��
�J�J�L���E	��s�AT%�%T*c���[R"SSU5n[R"SSU5nURS5nURR	5 URRSSS5 URR
SS	5 URRS
S5nUR5RS5(a-URU5 URRS
S5nURRSUSR5UR5 [U5S
:�a�[R"SUS5R!S5n[R"SU5R!S5nUS
SHanUR#U5(aXg[U5S-nURRSSUR5-UR5 Mc URR%S5 URR'5 g!URR%S5 URR'5 f=f)Nz^\s*\nrez\n\s*$r�r�r�r�r{rSr��:rrz	^([ \t]*))�re�subr�rL�undo_block_startr�r\r_�rstrip�endswithr�r{r��user_input_insert_tagsr��search�groupr�r��undo_block_stop)rGr0rr��prefix�orig_base_indent�new_base_indentrs        r(r��PyShell.recall-s����F�F�9�b�!�$���F�F�9�b�!�$������
���	�	�"�"�$�	(��I�I� � ���u�5��I�I���x��2��Y�Y�]�]�#5�x�@�F��}�}��'�'��,�,��-�-�e�4������'9�8�D���I�I���X�u�Q�x�~�~�'7�!�8�8�
:��5�z�A�~�#%�9�9�\�5��8�#D�#J�#J�1�#M� �#%�9�9�\�6�#B�#H�#H��#K��!�!�"�I�D����'7�8�8�.�c�:J�6K�6L�1M�M���I�I�$�$�X�t�d�k�k�m�/C�%)�%@�%@�B�	&�
�I�I�M�M�(�#��I�I�%�%�'��
�I�I�M�M�(�#��I�I�%�%�'�s
�F&H9�97I0z[ \t]*(\n[ \t]*)?\Zc��URRS5nURRSS5nURR	SU5nUR
R
U5nU(d`URRU5S:Xa&URRURU5 URR5 gg)N�end-2cr�rSrer�)rLrrr_�_last_newline_rer�rvr�r�r�r"�update_sidebar)rG�index_beforer�input_is_completes    r(r��
PyShell.runitJs����y�y���x�0���y�y�}�}�X�x�0���$�$�(�(��T�2�� �K�K�1�1�$�7�� ��y�y�}�}�\�*�d�2��	�	�$�$�T�%@�%@�,�O����-�-�/�!r0c�"�URR(aURR5$SSKJn U"UR
[RUR5 g! [R"SSURS9 g=f)Nr)�StackBrowserzNo stack tracez:There is no stack trace yet.
(sys.last_exc is not defined)r�)rvr?r��idlelib.stackviewerr�r�r
�last_excrPr
r�rL)rGrr�s   r(r��PyShell.open_stack_viewerVsp���;�;����;�;�2�2�4�4�4�	"�����C�L�L�$�*�*�=���	"�� � �!1�0��y�y�
"��s�,A*�*"Bc�p�URRS5 URRS5 g)Nr�rT)rLr�r�s  r(r1�PyShell.view_restart_markds"���	�	�
�
�h���	�	�
�
�i� r0c�6�URRSS9 g)z&Callback for Run/Restart Shell Cntl-F6Tr:N)rvrbr�s  r(r2�PyShell.restart_shellhs�����&�&��&�5r0c��UR5 URnUR(a9URUR5(aUS[	UR5*nUR
R
SS5 URRU5 URR5 UR
RSS5 UR5 URR5 g)Nr7z	iomark-1cr{rS)r�r(r&r�r�rLrqr7r!r"r�r\�set_line_and_columnrW�
reset_undo)rGr(s  r(r^�PyShell.showpromptls������������<�<�F�O�O�D�L�L�9�9��/�c�$�,�,�/�/�0�F��	�	���)�[�1������6�"����)�)�+��	�	���8�X�.�� � �"������r0c��URRRn[USSS9nSR	URU55nUR
S5(dUS-
nURRRSUS5 g)N�T)r�tabsize�expand_tabsr�r�r9)
rvrrr
rTrr�r>�bottomr{)rGr�r�wrapper�wrapped_msgs     r(�show_warning�PyShell.show_warningzsr�����%�%�+�+���E�1�$�G���i�i����S� 1�2���#�#�D�)�)��4��K��������1�;��Ir0c��URRSS5nUR(aURRU5 URRS5S:waURR	SS5 URRSS5 UR
5 URR5 g)Nr�rSr�r�)	rLr_r=�storer{r\r��ctip�remove_calltip_window)rGr�s  r(r��PyShell.resetoutput�s��������x��2���<�<��L�L���v�&��9�9�=�=��"�d�*��I�I���X�t�,��	�	���8�X�.�� � �"��	�	�'�'�)r0c��URRSS5 [R"XUS5nURRSS5 UR(aSUl[
(d[eU$! e=f)Nr��rightrUF)rLr]rr!r�r�r�)rGr0r��counts    r(r!�
PyShell.write�sm��	��I�I�"�"�8�W�5� �&�&�t��h�?�E��I�I�"�"�8�V�4��=�=�!�D�M�!�>�'�'����	��s�AA=�=Bc�>�URRSSS5(ag[TU]5$![a gf=f)Nr�r�r�r)rLr�r�r�r^rFs �r(r^�PyShell.rmenu_check_cut�sM���	��y�y� � ��c�8�<�<�!�=��w�&�(�(���	��	�s�"5�
A�Ac�f>�URRSSS5(ag[TU]
5$)Nr{r�r�r)rLr�r�rbrFs �r(rb�PyShell.rmenu_check_paste�s-����9�9���X�c�(�3�3���w�(�*�*r0c�l�URR5 URR5 grD)r3�squeeze_current_textr"r�r�s  r(r4�"PyShell.squeeze_current_text_event�s$���
�
�*�*�,����)�)�+r0c�8�URR5 grD)r"r�)rGrrrLr�s    r(�on_squeezed_expand�PyShell.on_squeezed_expand�s�����)�)�+r0)r�r�r�r7r�rZr=r$rvr�r(r'r�r6r7r5r"r3r9r�r8r&r#rD)r�)Qr�r�r�r��idlelib.squeezerrrr�r�rr�rrrr�r�r6�	itertools�	takewhile�_idxr{�allow_line_numbersr��idlelib.historyr�idlelib.sidebarrrKrDrIrRrWrgr0r�rZr�r�r�r�rurxr.r{r/r|r}r�r�r�rXr�r�r�r�r�r[r�r�r,r-r+r*r�r�rr�r�r�r1r2r^rr�r!r^rbr4rr�r�r�s@r(r�r�Is����)��.�"2�2�K�,�N�)�M��J��*�*�/�.��K�
�s�4�	�+�+�2�K�A����D����t�2�3�	
���$��(�,�P;�d-�/� �7��"+�(�G��I��H��I��G��� ��%�7�
�&�
&�>��
�
(�"� � �R�J��4��.��,
��M�^(�8�z�z�"8�9��
0��!�6��J�*��)�+�
,�,�,r0r�c
��URS:Xa0SH)nURUSSURUS5-5 M+ gg)z6Make paste replace selection on x11.  See issue #5124.�x11)�Text�Entry�Spinboxz	<<Paste>>z%catch {%W delete sel.first sel.last}
N)�_windowingsystem�
bind_class)r��clss  r(�
fix_x11_paster&�sG������%�-�C��O�O���8�����[�9�:�
;�.�&r0a�
USAGE: idle  [-deins] [-t title] [file]*
       idle  [-dns] [-t title] (-c cmd | -r file) [arg]*
       idle  [-dns] [-t title] - [arg]*

  -h         print this help message and exit
  -n         run IDLE without a subprocess (DEPRECATED,
             see Help/IDLE Help for details)

The following options will override the IDLE 'settings' configuration:

  -e         open an edit window
  -i         open a shell window

The following options imply -i and will open a shell:

  -c cmd     run the command in a shell, or
  -r file    run script from file

  -d         enable the debugger
  -s         run $IDLESTARTUP or $PYTHONSTARTUP before anything else
  -t title   set title of shell window

A default edit window will be bypassed when -c, -r, or - are used.

[arg]* are passed to the command (-c) or script (-r) in sys.argv[1:].

Examples:

idle
        Open an edit window or shell depending on IDLE's configuration.

idle foo.py foobar.py
        Edit the files, also open a shell if configured to start with shell.

idle -est "Baz" foo.py
        Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell
        window with the title "Baz".

idle -c "import sys; print(sys.argv)" "foo"
        Open a shell window and run the command, passing "-c" in sys.argv[0]
        and "foo" in sys.argv[1].

idle -d -s -r foo.py "Hello World"
        Open a shell window, run a startup script, enable the debugger, and
        run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in
        sys.argv[1].

echo "import sys; print(sys.argv)" | idle - "foobar"
        Open a shell window, run the script piped in, passing '' in sys.argv[0]
        and "foobar" in sys.argv[1].
c	�6�SSKnSSKJn SSKJn SSKJn [
S5 SqSnSnSnSnSnSn	UR[RSSS5up�W
H�up�U
S
:XaUnSnU
S:XaSnSnU
S:XaSnU
S:Xa8[RR![5 [R"5 U
S:XaSnU
S:Xa[S[RS9 SqU
S:XaJUn["R$R'U5(aO![SU5 [R"5 SnU
S:XaSn	SnU
S:XdM�U[(lSnM� W(a)USS:Xa [R,R/5nSn[1[3[R$55HDn["R$R5[R$U5[R$U'MF U(aUSS:XaS/USS-[l	GOU(aS
/U-[l	GOU(aU/U-[l	O�U(a�Sn/nUH1nUR7["R$R9U55 M3 UHXn["R$R5U5nU[R$;dM8[R$R;SU5 MZ OI["R<"5nU[R$;a [R$R;SU5 [>R@"SSSSS9nU=(d UnU=(d U(+n[(aU(d
[C5 [ESS 9q#[FRI5 SS!K%J&n U"[F5 ["R$RO["R$R9[P5S"5nU"5S#:Xa4["R$ROUS$5n[FRSUS%9 O�URU5(d}[VS&:�aS'nS(nOS)nS*nUVs/sH(n["R$ROUS+UU4-5PM* nnUVs/sHn[Y[FUS,9PM nn[FRZ"S/UQ76 [][F5 [_[F5 [a[F5q1URe[F[b5 U(a^U(dWU(dPUSSH,n[bRgU5bMURiU5 M. U(d[bRk5 U(aa[bRm5nU(dgURU5(a/[bRn(aURpRs5 O[bRtnU(aURw5 U	(a�["RxR{S-5=(d ["RxR{S.5nU(a?["R$R'U5(aUR|RU5 U(dU(a�UR|R�S/R�[R55 U(aUR|R�U5 OmU(a6UR|R�U5 UR|RU5 O/U(a(UR�5nU(aUR�U5 [bR�(a+[FR�5 [bR�(aM+[FR�5 [
S5 g!URaCn[S	US
[3[RS9 [R"S5 SnAGN�SnAff=fs snfs snf)0Nr)�system)�testing)�macosxTFrzc:deihnr:st:zError: r�rr�r,z-dz-ez-hz-iz-nz: Warning: running IDLE without a subprocess is deprecated.z-rzNo script file: z-sz-t�-rer&r'zeditor-on-startupr()r*�Idle)�	className)�fix_scaling�Icons�Windowszidle.ico)r)g333333!@z.png)�� �0�z.gif)r1r2r3z	idle_%d%s)�masterr�IDLESTARTUP�
PYTHONSTARTUPzdif 1:
            import sys as _sys
            _sys.argv = {!r}
            del _sys
            
)I�getoptr�r(r�r)r*r/r�r
�argv�errorr��	usage_msgr9�exitr8r!rRrSr�r�r�r�r�r�r�r�rt�dirnamer{�getcwdrr.�
NoDefaultRootr r�r!�idlelib.runr.rT�__file__�
wm_iconbitmap�isAquaTk�	TkVersion�
PhotoImage�wm_iconphotorr&r�rP�setupAppr�r��newrQrr��lowerrur}rr_rvr�r}r~r�r��preferTabsPreferenceWarningr�inversedictr��destroy)r8r(r)r*�enable_shell�enable_editrx�cmd�script�startup�optsr[r��o�arO�pathxr&�dir�
edit_startr.�icondir�iconfile�ext�sizes�size�	iconfiles�iconsr�prefer_tabs_preference_warnings                              r(r&r&�s��������T���N��L��K��E�
�C�
�F��G���]�]�3�8�8�A�B�<��@�
�������9��C��L���9��E��L���9��K���9��J�J���Y�'��H�H�J���9��L���9��N��z�z�
#�"�N���9��F��w�w�~�~�f�%�%���(�&�1����
��L���9��G��L���9�"#�G���L�?�@��Q��3���i�i�n�n�����
�3�s�x�x�=�
!���g�g�o�o�c�h�h�q�k�2������"���Q��3���4�$�q�r�(�?���	��6�D�=���	��8�d�?���	
������H��L�L�������2�3���C��'�'�/�/�#�&�C��#�(�(�?�������3�'��
�i�i�k���c�h�h���H�H�O�O�A�s�#��#�#�F�I�$7�f�F�J��+��K��2�{�?�L��~�g���
���D��M�M�O�'�����g�g�l�l�2�7�7�?�?�8�4�g�>�G�
�x�9���7�7�<�<���4�����8��,�
�_�_�
�
�����C�%�E��C� �E�!&�(�!&���W�W�\�\�'�;�$���+D�E�!&�	�(�"+�,�!*�X��4�h�7�!*�	�,����$�'��'��$���$���D�!�E�
�O�O�D�%� ���v� ��G���:�:�h�'�/��K�K��)�$���	�	���� � �"�����?�?������

�I�I�O�O����
�
��
�
������:�:�>�>�-�0�3��:�:�>�>�/�2�	�������x�0�0��L�L�!�!�(�+�
�f�
�����!��&����"�		$�
��L�L�#�#�C�(�
��L�L�(�(��0��L�L�!�!�&�)��	�*0�)K�)K�)M�&�)����=�>�
�
�
��
�
���
�
�
��L�L�N��U���y�<�<��
���u�B�y�k�*����<����������n(��,s#�%^;�/`�`�;`�8`	�	`)NN)Nr
r�rr��ImportErrorr�r�r�r��idlelib.utilr	r
r�rrr4rR�os.pathrr�rDr �textwrapr
rlr=r�r,�idlelib.colorizerr�idlelib.configr�idlelib.delegatorrr�rr�idlelib.editorrr�idlelib.filelistr�idlelib.outwinrrrr@rrr�idlelib.undorr�r<r�eofr<r��	NameErrorr r)r+r/�
checkcacher<r>r�r�r�r��	RPCClientr�rr	r�r&r;r&r�r0r(�<module>ros�����z��%(�[�[��%<�C�K�K�!�"����<�<�7��*��O��'���	��#�	�
�� �����,�#�'���6�%�'���G�G�&�������	�
 �C��D�H��D�H�����>B�
�"��)����+/�2;�2F�2F��(5�	��{"�,�{"�|�h��(
2�^�
2�/�M�/�D1�	�1��#�-�-���m(�0�m(�`
c	,�l�c	,�L;�4
�	�ln�b�z���F�����w4��	�9�?B�~�~�O�
�Q�-����b�	��	�s�F-�#G�- G
�G�G