HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/idlelib/__pycache__/runscript.cpython-310.opt-2.pyc
o

�iQ �@s�	ddlZddlZddlZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZddlm
Z
dZGd	d
�d
�ZedkrPddlmZed
dd�dSdS)�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@sZeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�d
d�Zdd�Z	dd�Z
dd�ZdS)�
ScriptBindingcCs*||_|jj|_|jj|_g|_d|_dS)Ng)�editwin�flist�root�cli_args�perf)�selfr	�r�./usr/local/lib/python3.10/idlelib/runscript.py�__init__&s



zScriptBinding.__init__cCsNt|jtj�r|jj��dS|��}|sdS|�|�sdS|�|�s%dSdS)N�break)	�
isinstancer	r�OutputWindow�text�bell�getfilename�checksyntax�tabnanny)r�event�filenamerrr�check_module_event0s

z ScriptBinding.check_module_eventcCs�t�|��k}zt�t�|j��WnVtjy@}z"|j\}\}}|j�	|�|�
dd|�WYd}~Wd�dSd}~wtjyg}z|j�	|���|�
dt
�WYd}~Wd�dSd}~wwWd�dS1sswYdS)NzTabnanny Tokenizing ErrorzToken Error: %sFzTab/space errorT)�tokenize�openrZprocess_tokens�generate_tokens�readline�
TokenError�argsr	Zgotoline�errorboxZNannyNagZ
get_lineno�indent_message)rr�f�msgZmsgtxt�lineno�startZnagrrrr=s0�
��	
��	�
��zScriptBinding.tabnannyc

Cs�|j��|_}|��}|�|j�t|d��}|��}Wd�n1s&wYd|vr;|�dd�}|�dd�}|rI|dt	d�krI|d}|j
}|j}|�ddd�zdz
t
||d	�WW|�|�Stttfy�}zGt|d
d�px|pxd}	t|d
d�p�d}
t|dd�p�d}|dkr�|
d7}
d|
d|df}|�||�|�dd|	�WYd}~W|�|�dSd}~ww|�|�w)N�rb�
s
�
����ERRORz1.0�end�execr&�z<no detail available>r'��offsetrz0.0 + %d lines + %d chars�SyntaxErrorz%-20sF)r
Z
open_shell�shellZget_warning_streamZset_warning_stream�stderrr�read�replace�ordr	rZ
tag_remove�compiler3�
OverflowError�
ValueError�getattrZcolorize_syntax_errorr#)
rrr4Zsaved_streamr%�sourcer	r�valuer&r'r2�posrrrrOs>
����zScriptBinding.checksyntaxcCs|j|dd�S)NT��	customize)�run_module_event)rrrrr�run_custom_eventmszScriptBinding.run_custom_eventFr@c	Cs0	t��rt��|jdkrdSt|jtj�r|jj	�
�dS|��}|s'dS|�|�}|s0dS|�
|�s7dS|rQd|j���d�}t|jj	||jd�j}|sQdS|rU|ngdf\|_}|jj}tjrl|rl|jd|d�tj�|�}	|g}
|jr}|
|j7}
|�d	|�d
|
�d|	�d��|�|�|�|�dS)
Ng�������?rz
Customize z Run)rTF)Zwith_cwdrzif 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
            
)rZ	isCocoaTk�time�perf_counterr
rr	rrrrrrrZshort_titlerr4r�result�interprZuse_subprocessZrestart_subprocess�os�path�dirnameZ
runcommandZprepend_syspathZruncode)rrrAr�code�titleZrun_argsZrestartrGrJ�argvrrrrBpsV


��
�
��

�

zScriptBinding.run_module_eventcCs~	|jjj}|j��s=tjddddd�}|r!|r!|jj�d�|S|��}|jj�	�|r;|jj�d�|jjj}|Sd}|S)N�mainZGeneral�autosave�bool)�type)
r	�iorZ	get_savedrZ	GetOption�save�ask_save_dialogr�	focus_set)rrrO�confirmrrrr�s"


�	�
�zScriptBinding.getfilenamecCs d}tjd|tj|jjd�}|S)Nz%Source Must Be Saved
     OK to Save?zSave Before Run or Check)rL�message�default�parent)rZaskokcancelZOKr	r)rr&rVrrrrT�s�zScriptBinding.ask_save_dialogcCs.tj|||jjd�|jj��t��|_dS)N)rY)rZ	showerrorr	rrUrDrEr
)rrLrWrrrr#�szScriptBinding.errorboxN)�__name__�
__module__�__qualname__rrrrrCrBrrTr#rrrrr$s

9r�__main__)rNz idlelib.idle_test.test_runscript�)�	verbosity)rHrrDr�tkinterrZidlelib.configrZidlelibrrZ
idlelib.queryrrr$rrZZunittestrNrrrr�<module>s$0�