b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / idlelib /
Filename/usr/lib64/python2.6/idlelib/ScriptBinding.pyc
Size7.43 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 09:38
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc @s�dZddkZddkZddkZddkZddkZddkZddklZddk l
Z
ei ei dZ
dZdd d��YZdS(
s?Extension to execute code outside the Python shell window.

This adds the following commands:

- Check module does a full syntax check of the current module.
It also runs the tabnanny to catch any inconsistent tabs.

- Run module executes 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.

XXX GvR Redesign this interface (yet again) as follows:

- Present a dialog box for ``Run Module''

- Allow specify command line arguments in the dialog box

iÿÿÿÿN(tPyShell(tidleConft_s/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.
t
ScriptBindingcBsqeZddddgfgZd�Zd�Zd�Zd�Zd �Zd
�Z d �Z
d �Z d
�Z RS(truns Check Modules<<check-module>>s
Run Modules<<run-module>>cCs+||_|ii|_|ii|_dS(N(teditwintflisttroot(tselfR((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyt__init__1s cCsF|i�}|pdS|i|�pdS|i|�pdSdS(Ntbreak(t getfilenamet checksyntaxttabnanny(Rteventtfilename((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pytcheck_module_event8s cCsÀt|d�}ytiti|i��Wn�tij
o@}|\}\}}|ii|�|i dd|�t
Sti j
o0}|ii|i ��|i dt
�t
SXtS(NtrsTabnanny Tokenizing ErrorsToken Error: %ssTab/space error(topenR
tprocess_tokensttokenizetgenerate_tokenstreadlinet
TokenErrorRtgotolineterrorboxtFalsetNannyNagt
get_linenotindent_messagetTrue(RRtftmsgtmsgtxttlinenotstarttnag((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyR
As  c
Cs¯|ii�|_}|i�}|i|i�t|d�}|i�}|i�d|jo.t i
dd|�}t i
dd|�}n|o|ddjo|d}n|i i }|i
ddd �zÃyt||d
�SWn¨ttfj
o�}y^|\}\} }
} } | p(|||
| | ff|_||_n|i||
| �Wnd t|�}nX|id d
|�tSXWd|i|�XdS(NRs
s\r\ns
s\riÿÿÿÿtERRORs1.0tendtexecs*** s Syntax errors"There's an error in your program:
(Rt
open_shelltshelltget_warning_streamtset_warning_streamtstderrRtreadtclosetretsubRttextt
tag_removetcompilet SyntaxErrort
OverflowErrortargsRtcolorize_syntax_errortstrRR(
RRR)t saved_streamRtsourceR1terrR t
errorfilenameR"toffsettline((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyR Rs:  

 
  
cCsÁ|ii}d|d|df}|id|�|i|�}|o(|tjo|id|d|�nd|i|�jo|id|�n|id|d�|i|�dS(Ns0.0 + %d lines + %d charsiR%s
wordstarts
tinserts+1c(RR1ttag_addtgett
IDENTCHARStmark_settsee(RR R"R=R1tpostchar((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyR7ss cCs¹|i�}|pdS|i|�}|pdS|i|�pdS|i}|i}tio|i�nti i
|�}|i d||f�|i |�|i
|�dS(sYRun the module after setting up the environment.

First check the syntax. 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.

R
suif 1:
_filename = %r
import sys as _sys
from os.path import basename as _basename
if (not _sys.argv or
_basename(_sys.argv[0]) != _basename(_filename)):
_sys.argv = [_filename]
import os as _os
_os.chdir(%r)
del _filename, _sys, _basename, _os

(R R R
R)tinterpRtuse_subprocesst
restart_shelltostpathtdirnamet
runcommandtprepend_syspathtruncode(RRRtcodeR)RGRL((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pytrun_module_event�s$   



cCs¼|iii}|ii�p�tiddddd�}|o|o|iiid�q¸|i�}|ii i
�|djo&|iiid�|iii}q¸d}n|S(s±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.

tmaintGeneraltautosavettypetbooltokN( RtioRt get_savedRt GetOptiontsavetNonetask_save_dialogR1t focus_set(RRRTtreply((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyR ©s   

c
CsWdd d}tiddd|dtid tid
tid |ii�}|i�S(
NsSource Must Be Saved
it s OK to Save?ttitlesSave Before Run or ChecktmessageticonRUtdefaulttmasters (t tkMessageBoxtMessagetQUESTIONtOKCANCELtOKRR1tshow(RR tmb((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyR]Äs   cCs0ti||d|ii�|iii�dS(NRe(Rft showerrorRR1R^(RRaRb((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyRÎsN(s Check Modules<<check-module>>(s
Run Modules<<run-module>>(
t__name__t
__module__R\tmenudefsR RR
R R7RQR R]R(((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyR*s   !
) 
((t__doc__RJR/tstringR
RRftidlelibRtidlelib.configHandlerRt
ascii_letterstdigitsRBRR(((s-/usr/lib64/python2.6/idlelib/ScriptBinding.pyt<module>s