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__/runscript.cpython-313.pyc
�

��eQ ���SrSSKrSSKrSSKrSSKrSSKJr SSKJr SSK	J
r
 SSK	Jr SSKJ
r
 SSK	Jr S	r"S
S5r\S:XaSS
KJr \"SSS9 gg)a�Execute code from an editor.

Check module: do a full syntax check of the current module.
Also run the tabnanny to catch any inconsistent tabs.

Run module: also execute the module's code in the __main__ namespace.
The window must have been saved previously. The module is added to
sys.modules, and is also added to the __main__ namespace.

TODO: Specify command line arguments in a dialog box.
�N)�
messagebox)�idleConf)�macosx)�pyshell)�	CustomRun)�outwina/Error: Inconsistent indentation detected!

1) Your indentation is outright incorrect (easy to fix), OR

2) Your indentation mixes tabs and spaces.

To fix case 2, change all tabs to spaces by using Edit->Select All followed by Format->Untabify Region and specify the number of columns used by each tab.
c�R�\rSrSrSrSrSrSrSrSS.S	jr	S
r
SrSrS
r
g)�
ScriptBinding�$c��XlURRUlURRUl/UlSUlg)Ng)�editwin�flist�root�cli_args�perf)�selfr
s  �7/opt/imh/python3.13/lib/python3.13/idlelib/runscript.py�__init__�ScriptBinding.__init__&s9�����\�\�'�'��
��L�L�%�%��	���
���	�c�,�[UR[R5(a%URRR5 gUR
5nU(dgURU5(dgURU5(dgg)N�break)	�
isinstancer
r�OutputWindow�text�bell�getfilename�checksyntax�tabnanny)r�event�filenames   r�check_module_event� ScriptBinding.check_module_event0so���d�l�l�F�$7�$7�8�8��L�L���"�"�$���#�#�%��������)�)���}�}�X�&�&��rc�j�[R"U5n[R"[R"UR
55 SSS5 g![RaSnURunupVURRU5 URSSU-5 SnASSS5 gSnAf[RaQnURRUR55 URS[5 SnASSS5 gSnAff=f!,(df   g=f)NzTabnanny Tokenizing ErrorzToken Error: %sFzTab/space errorT)�tokenize�openr�process_tokens�generate_tokens�readline�
TokenError�argsr
�gotoline�errorbox�NannyNag�
get_lineno�indent_message)rr!�f�msg�msgtxt�lineno�start�nags        rr�ScriptBinding.tabnanny=s���
�]�]�8�
$��
��'�'��(@�(@����(L�M�%����&�&�
�*-�(�(�'�������%�%�f�-��
�
�9�/�&�8�:��%�
$���$�$�
����%�%�c�n�n�&6�7��
�
�/��@��%�
$��
��%�
$��sA�D$�4A�D!�+AB9�,D$�9D!�?D�D$�D!�!D$�$
D2c���URR5=UlnUR5nUR	UR
5 [
US5nUR5nSSS5 SW;a$URSS5nURSS5nU(aUS[S5:waUS-nURnURnURSSS5 [XQS	5UR	U5 $!,(df   N�=f![[[ 4a�n[#US
S5=(d U=(d Sn	[#US
S5=(d Sn
[#USS5=(d SnUS:XaU
S-
n
SU
S-
US-
4-nUR%X|5 UR'SSU	-5 SnAUR	U5 gSnAff=f!UR	U5 f=f)N�rb�
s
�
����ERRORz1.0�end�execr2�z<no detail available>r4��offsetrz0.0 + %d lines + %d chars�SyntaxErrorz%-20sF)r�
open_shell�shell�get_warning_stream�set_warning_stream�stderrr&�read�replace�ordr
r�
tag_remove�compilerC�
OverflowError�
ValueError�getattr�colorize_syntax_errorr-)
rr!rE�saved_streamr1�sourcer
r�valuer2r4rB�poss
             rr�ScriptBinding.checksyntaxOs���!�Z�Z�2�2�4�4��
�U��/�/�1��
� � ����.�
�(�D�
!�Q��V�V�X�F�"��F�?��^�^�G�U�3�F��^�^�E�5�1�F��f�R�j�C��J�.��e�^�F��,�,���|�|��������.�	3��6�V�4�
�$�$�\�2�1"�
!���]�J�7�		��%���+�O�u�O�8O�C��U�H�b�1�6�Q�F��U�H�b�1�6�Q�F���{��!���-����6�!�8�0D�D�C��)�)�$�4��M�M�-��3��7���$�$�\�2��		��
�$�$�\�2�s7�D�&D�
D�G
�)B	G�2G�G
�
G�G#c�"�URUSS9$)NT��	customize)�run_module_event)rr s  r�run_custom_event�ScriptBinding.run_custom_eventms���$�$�U�d�$�;�;rFrXc	�"�[R"5(a'[R"5UR-
S:ag[UR[R5(a%URRR5 gUR5nU(dgURU5nU(dgURU5(dgU(aYSURR5S3n[UR RUUR"S9R$nU(dgU(aWO/S4uUlnUR R&n[(R*(aU(aUR-SUS9 [.R0R3U5n	U/n
UR"(aX�R"-
n
UR5S	U<S
U
<SU	<S35 UR7U5 UR9U5 g)
aIRun the module after setting up the environment.

First check the syntax.  Next get customization.  If OK, make
sure the shell is active and then transfer the arguments, set
the run environment's working directory to the directory of the
module being executed and also add that directory to its
sys.path if not already included.
g�������?rz
Customize z Run)rTF)�with_cwdr!zif 1:
            __file__ = zi
            import sys as _sys
            from os.path import basename as _basename
            argv = z�
            if (not _sys.argv or
                _basename(_sys.argv[0]) != _basename(__file__) or
                len(argv) > 1):
                _sys.argv = argv
            import os as _os
            _os.chdir(z:)
            del _sys, argv, _basename, _os
            
)r�	isCocoaTk�time�perf_counterrrr
rrrrrrr�short_titlerrEr�result�interpr�use_subprocess�restart_subprocess�os�path�dirname�
runcommand�prepend_syspath�runcode)rr rYr!�code�title�run_args�restartrdri�argvs           rrZ�ScriptBinding.run_module_eventps��������4�#4�#4�#6����#B�S�#H���d�l�l�F�$7�$7�8�8��L�L���"�"�$���#�#�%��������)�����}�}�X�&�&��� ����!9�!9�!;� <�D�A�E� ������%�*.�-�-�9�9?��
���-6��R��J���
�w����"�"���!�!�g��%�%�"�X�
&�
7��'�'�/�/�(�+���z���=�=��M�M�!�D����� �|�$��8���k�"��	�	���x�(�	���t��rc�$�URRRnURR5(d�[R
"SSSSS9nU(a.U(a'URRR
S5 U$UR5nURRR5 U(aGURRR
S5 URRRnU$SnU$)a�Get source filename.  If not saved, offer to save (or create) file

The debugger requires a source file.  Make sure there is one, and that
the current version of the source buffer has been saved.  If the user
declines to save or cancels the Save As dialog, return None.

If the user has configured IDLE for Autosave, the file will be
silently saved if it already exists and is dirty.

�main�General�autosave�bool)�typeN)
r
�ior!�	get_savedr�	GetOption�save�ask_save_dialogr�	focus_set)rr!rv�confirms    rr�ScriptBinding.getfilename�s����<�<�?�?�+�+���|�|�%�%�'�'��)�)�&�)�*4�6�C�H��H������$�$�T�*����.�.�0�����!�!�+�+�-���L�L�O�O�(�(��.�#�|�|���7�7�H��� $�H��rc�|�Sn[R"SU[RURRS9nU$)Nz%Source Must Be Saved
     OK to Save?zSave Before Run or Check)rn�message�default�parent)r�askokcancel�OKr
r)rr2rs   rr}�ScriptBinding.ask_save_dialog�s9��>���(�(�/I�36�3=�=�=�26�,�,�2C�2C�E���rc���[R"XURRS9 URRR	5 [
R"5Ulg)N)r�)r�	showerrorr
rr~r`rar)rrnr�s   rr-�ScriptBinding.errorbox�sB�����U�D�L�L�4E�4E�F������#�#�%��%�%�'��	r)rr
rrrrEN)�__name__�
__module__�__qualname__�__firstlineno__rr"rrr[rZrr}r-�__static_attributes__�rrr
r
$s5�����$3�<<�49�7�r�6�(rr
�__main__)rtz idlelib.idle_test.test_runscript�)�	verbosity)�__doc__rgrr`r%�tkinterr�idlelib.configr�idlelibrr�
idlelib.queryrrr0r
r��unittestrtr�rr�<module>r�s[��
�
�����#���#����l(�l(�^�z����	+�q�:�r