Viewing File: /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/ScriptBinding.cpython-35.opt-2.pyc



]}@sddlZddlZddlZddljZddlmZddlm	Z	ddlm
Z
dZGdddZdS)N)PyShell)idleConf)
macosxSupporta/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@seZdZddddgfgZddZd	d
ZddZd
dZddZddZ	ddZ
ddZddZdS)
ScriptBindingrunNCheck Module<<check-module>>
Run Module<<run-module>>cCsP||_|jj|_|jj|_tjrL|jjjd|jdS)Nz<<run-module-event-2>>)editwinflistrootr	isCocoaTk
text_framebind_run_module_event)selfrr2/opt/alt/python35/lib64/python3.5/ScriptBinding.py__init__/s
	zScriptBinding.__init__cCs@|j}|sdS|j|s)dS|j|s<dSdS)Nbreak)getfilenamechecksyntaxtabnanny)reventfilenamerrrcheck_module_event9sz ScriptBinding.check_module_eventcCstj|}ytjtj|jWntjk
r}zB|j\}\}}|jj	||j
dd|dSWYdd}~XnRtjk
r}z/|jj	|j|j
dt
dSWYdd}~XnXWdQRXdS)NzTabnanny Tokenizing ErrorzToken Error: %sFzTab/space errorT)tokenizeopenrZprocess_tokensgenerate_tokensreadline
TokenErrorargsrZgotolineerrorboxZNannyNagZ
get_linenoindent_message)rrfmsgZmsgtxtlinenostartZnagrrrrBs	zScriptBinding.tabnannyc
Cs|jj|_}|j}|j|jt|d}|j}WdQRXd|kr|jdd}|jdd}|r|dt	dkr|d}|j
}|j}|jdddzyt
||d	SWntttfk
r}zt|d
dp"|p"d}	t|d
dp:d}
t|ddpRd}|dkrk|
d7}
d|
d|df}|j|||jdd|	dSWYdd}~XnXWd|j|XdS)Nrbs
s
s
ERRORz1.0endexecr&z<no detail available>r'offsetrz0.0 + %d lines + %d charsSyntaxErrorz%-20sF)rZ
open_shellshellZget_warning_streamZset_warning_streamstderrrreadreplaceordrtextZ
tag_removecompiler0
OverflowError
ValueErrorgetattrZcolorize_syntax_errorr#)
rrr2Zsaved_streamr%sourcerr7valuer&r'r/posrrrrTs4
		
zScriptBinding.checksyntaxcsCtjr2jjjdfdddSj|SdS)NcsjjjdS)Nz<<run-module-event-2>>)rrZevent_generater)rrr<lambda>zsz0ScriptBinding.run_module_event.<locals>.<lambda>r)rrrrafterr)rrr)rrrun_module_eventrs
zScriptBinding.run_module_eventcCs|j}|sdS|j|}|s/dS|j|sBdS|jj}tjry|jddd|jj	|t
jj|}|j
djd|d||j||j|dS)NrZwith_cwdFrazif 1:
            __file__ = {filename!r}
            import sys as _sys
            from os.path import basename as _basename
            if (not _sys.argv or
                _basename(_sys.argv[0]) != _basename(__file__)):
                _sys.argv = [__file__]
            import os as _os
            _os.chdir({dirname!r})
            del _sys, _basename, _os
            
dirname)rrrr2interprZuse_subprocessZrestart_subprocessrZ_filename_to_unicodeospathrCZ
runcommandformatZprepend_syspathZruncode)rrrcoderDrCrrrrs$		


zScriptBinding._run_module_eventcCs|jjj}|jjstjddddd}|r[|r[|jjjdnM|j}|jjj	|r|jjjd|jjj}nd}|S)NmainZGeneralautosavetypebool)
riorZ	get_savedrZ	GetOptionsaveask_save_dialogr7	focus_set)rrrJconfirmrrrrszScriptBinding.getfilenamec	Cs?dd
d}tjddd|dtjd	|jj}|S)NzSource Must Be Saved
 zOK to Save?titlezSave Before Run or Checkmessagedefaultparentz     )tkMessageBoxZaskokcancelZOKrr7)rr&rQrrrrOs	zScriptBinding.ask_save_dialogcCs0tj||d|jj|jjjdS)NrW)rXZ	showerrorrr7rP)rrTrUrrrr#szScriptBinding.errorbox)rr)r	r
)
__name__
__module____qualname__ZmenudefsrrrrrBrrrOr#rrrrr(s
	
)r)
rErrZtkinter.messageboxZ
messageboxrXZidlelibrZidlelib.configHandlerrrr$rrrrr<module>s

Back to Directory File Manager