tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[\¬Qc@s¯dZddlZddlZddlZddlZddlZddlZddlmZddl    m
Z
ddlm Z ej ej dZdZdd
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(tidleConf(t macosxSupportt_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 ScriptBindingcBseZddddgfgZd„Zd„Zd„Zd„Zd    „Zd
„Z    e
j ƒrre    Z d „Z    nd „Z d „Zd„ZRS(truns Check Modules<<check-module>>s
Run Modules<<run-module>>cCsS||_|jj|_|jj|_tjƒrO|jjjd|jƒndS(Ns<<run-module-event-2>>(teditwintflisttrootRtrunningAsOSXAppt
text_frametbindt_run_module_event(tselfR((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyt__init__2s
     cCs@|jƒ}|sdS|j|ƒs)dS|j|ƒs<dSdS(Ntbreak(t getfilenamet checksyntaxttabnanny(R teventtfilename((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pytcheck_module_event<s cCs¼t|dƒ}ytjtj|jƒƒWn‰tjk
r{}|\}\}}|jj|ƒ|j    dd|ƒt
Stj k
r·}|jj|j ƒƒ|j    dt ƒt
SXtS(NtrsTabnanny Tokenizing ErrorsToken Error: %ssTab/space error(topenRtprocess_tokensttokenizetgenerate_tokenstreadlinet
TokenErrorRtgotolineterrorboxtFalsetNannyNagt
get_linenotindent_messagetTrue(R Rtftmsgtmsgtxttlinenotstarttnag((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyREs     c Cs©|jjƒ|_}|jƒ}|j|jƒt|dƒ}|jƒ}|jƒd|krt    j
dd|ƒ}t    j
dd|ƒ}n|r³|ddkr³|d}n|j j }|j ddd    ƒzÂyt||d
ƒSWn§tttfk
r’}y\|\}\}    }
} } |    sL|||
| | ff|_||_n|j||
| ƒWnd t|ƒ}nX|jd d |ƒtSXWd|j|ƒ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 OverflowErrort
ValueErrortargsRtcolorize_syntax_errortstrRR( R RR.t saved_streamR$tsourceR6terrR%t errorfilenameR'toffsettline((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyRVs:  
             cCs¼|jj}d|d|df}|jd|ƒ|j|ƒ}|ro|tkro|jd|d|ƒnd|j|ƒkr—|jd|ƒn|jd|dƒ|j|ƒdS(Ns0.0 + %d lines + %d charsiR*s
 wordstarts
tinserts+1c(RR6ttag_addtgett
IDENTCHARStmark_settsee(R R%R'RCR6tpostchar((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyR=ws cCs±|jƒ}|sdS|j|ƒ}|s/dS|j|ƒsBdS|jj}tjrj|jdtƒnt    j
j |ƒ}|j d||fƒ|j |ƒ|j|ƒ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.
 
        Rtwith_cwdsuif 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
            
(RRRR.tinterpRtuse_subprocesstrestart_subprocessRtostpathtdirnamet
runcommandtprepend_syspathtruncode(R RRtcodeRNRS((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pytrun_module_event„s"          
  cs#ˆjjjd‡fd†ƒdS(NiÈcsˆjjjdƒS(Ns<<run-module-event-2>>(RR
tevent_generate((R (s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyt<lambda>¶sR(RR
tafter(R R((R s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyRX´scCs¯|jjj}|jjƒs«tjdddddƒ}|r[|r[|jjjdƒq«|jƒ}|jj    j
ƒ|r¢|jjjdƒ|jjj}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.
 
        tmaintGeneraltautosavettypetboolN( RtioRt    get_savedRt    GetOptiontsavetNonetask_save_dialogR6t    focus_set(R RR^tconfirm((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyR¹s        c    Cs?dd
d}tjddd|dtjd    |jjƒ}|S( NsSource Must Be Saved
it s OK to Save?ttitlesSave Before Run or Checktmessagetdefaulttmasters     (t tkMessageBoxt askokcanceltOKRR6(R R%Rh((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyRfÔs     cCs0tj||d|jjƒ|jjjƒdS(NRm(Rnt    showerrorRR6Rg(R RjRk((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyRÜsN(s Check Modules<<check-module>>(s
Run Modules<<run-module>>(t__name__t
__module__RetmenudefsRRRRR=RXRR    R RRfR(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyR+s    
               !        (          ((t__doc__RQR4tstringRRRntidlelibRtidlelib.configHandlerRRt ascii_letterstdigitsRHR"R(((s]/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/idlelib/ScriptBinding.pyt<module>s