• File: run.cpython-37.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python37/lib64/python3.7/idlelib/__pycache__/run.cpython-37.opt-2.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 14.85 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

YI~dEO@s:ddlZddlZddlZddlZddlZddlZddlZddlZddlZ	ddl
Z
ddlZddlm
Z
ddlmZddlmZddlmZddlmZddlmZddlmZddlZddlZeejd	d
sx"dD]Zeeeejde=qWd
ejd	_dZd@ddZdAddZdaddZede Z!e!fddZ"d
a#d
a$d
a%dBddZ&ddZ'ddZ(ddZ)d d!Z*d"d#Z+d$d%Z,d&d'Z-d(d)Z.d*Z/d+d,Z0d-d.Z1Gd/d0d0ej2Z3Gd1d2d2ej4Z5Gd3d4d4e5Z6Gd5d6d6e5Z7Gd7d8d8ej8Z9Gd9d:d:e:Z;e<d;kr.dd<l=m&Z&e&d=d>d?ed
dS)CN)autocomplete)calltip)
debugger_r)
debugobj_r)iomenu)rpc)stackviewerzidlelib.runfirstrun)ZsimpledialogZ
messageboxfontZdialogZ
filedialogZcommondialogZttkztkinter.Fz	127.0.0.1cCsVd}|d||f7}|dkr(t||}|}|r@|d|7}|d|j|f7}|S)Nz!
Warning (from warnings module):
z  File "%s", line %s
z    %s
z%s: %s
)	linecachegetlinestrip__name__)messagecategoryfilenamelinenolinesr0/opt/alt/python37/lib64/python3.7/idlelib/run.pyidle_formatwarning*srcCsB|dkrtj}y|t|||||Wntk
r<YnXdS)N)sysstderrwriterOSError)rrrrfilerrrridle_showwarning_subproc7srcCs0|rtdkr,tjatt_ntdk	r,tt_dadS)N)_warnings_showwarningwarningsshowwarningr)Zcapturerrrcapture_warningsGsr!TcCs|ddS)Nupdate)eval)tclrrrhandle_tk_eventsWsr%cCs|ayttjd}WntdtjddStddgtjdd<tjt	dt
|ffd}d|_|x0yt
ry
tWntk
rwpYnXytjjddd	}Wntjk
rd}YnX|r|\}\}}}|||}tj||fntWqptk
r trda
wpYqptk
r>td
Yqpt\}	}
}yttj|dfWn&tj|	|
|tjdtYnXwpYqpXqpWdS)Nz/IDLE Subprocess: no IP port passed in sys.argv.)rTZ
SockThread)targetnameargsg?)blockZtimeoutF)no_exitfuncintrargvprint
__stderr__r!	threadingZThread
manage_socket	LOCALHOSTZdaemonstartexit_nowexitKeyboardInterruptrZ
request_queuegetqueueZEmptyZresponse_queueZputr%quitting
SystemExitexc_infoprint_exception	traceback)Zdel_exitfuncZportZ
sockthreadrequestseqmethodr*kwargsrettypevaluetbrrrmaines\




rGcCsxtdD]b}t|yt|t}PWq
tk
rj}z$td|jddtj	d|}Wdd}~XYq
Xq
Wtdtj	dt
||dadS|dS)NzIDLE Subprocess: OSError: z, retrying....)rz8IDLE Subprocess: Connection to IDLE GUI failed, exiting.T)
rangetimesleepMyRPCServer	MyHandlerrr/r*rr0show_socket_errorr5Zhandle_request)addressiZservererrZsocket_errorrrrr2s



r2cCslddl}ddlm}|}t|||dd|dd|dd|jd|jd		|d
|dS)Nr)	showerrorzSubprocess Connection Errorz#IDLE's subprocess can't connect to :rIz.
Fatal OSError #z: zz.
See the 'Startup failure' section of the IDLE doc, online at
https://docs.python.org/3/library/idle.html#startup-failure)parent)	tkinterZtkinter.messageboxrSZTkfix_scalingZwithdrawerrnostrerrorZdestroy)rRrPrVrSrootrrrrOs(rOcsdddl}|ttjt\}}}}|\t_t_t_t	fdd|||dS)Nrc	st||j}|j}|dk	rNt|krNt|||jtddn8|dk	r|jst|krt|||jtdd|rt	|}tddd}t
||tj|dt||}x|D]}t|ddqWdS)NzF
The above exception was the direct cause of the following exception:
)rzE
During handling of the above exception, another exception occurred:
z"Traceback (most recent call last):)zrun.pyzrpc.pyzthreading.pyzqueue.pyz
debugger_r.pyzbdb.pyr')endr)
addid__context__	__cause__rD
__traceback__r/__suppress_context__r>
extract_tbcleanup_traceback
print_listformat_exception_only)	typexcrFcontextcauseZtbeexcludelinesr)efile	print_excseenrrrms,



z"print_exception.<locals>.print_exc)
r
checkcacheflush_stdoutrrr<	last_type
last_valuelast_tracebackset)rrfvalrFexcinfor)rlrmrnrr=sr=c
Cs|dd}x2|r>x"|D]}|dd|rPqWP|d=qWx2|rrx"|D]}|dd|rLPqLWP|d=qBWt|dkr|dd|dd<tdtjdtjdj}xbtt|D]R}||\}}}}	|dkrd}|	s|	dr|
d	d
||fi}	||||	f||<qWdS)Nrr&z** IDLE Internal Exception: )rexec?z
-toplevel-z	<pyshell#rr)countlenr/rrrZobjecttable
rpchandlerrJ
startswithZ
remotecall)
rFrjZorig_tbZrpcfiler{rQfnZlnZnmrrrrrcs2



rccCsdS)NrrrrrrpsrpcCs*trddl}|tdtddS)NrF)r,atexitZ_clearr!rr6)r~rrrr6s
r6cCsrddl}t|jdd}|dkrnxJ|j|D]:}|jj||dd}t|d}|dkr0td||d<q0WdS)	Nrtkscalinggffffff?T)rZr)existssizeg)	Ztkinter.fontfloatrZcallr
namesZFontr-round)rZrVrr)r
rrrrrW*srWcCs2|jdk	r|jdnd}|tt||_dS)Nz

r')__doc__textwrapfilldedent)ZfuntextZtemrrrfixdoc6srcs|ttjfddtdtdttjfddtdtdtd	tttt_t_dS)
Ncs^|rtdy
|\}Wn(tk
r>tdt|dYnX|dksPtd|tS)Nz.setrecursionlimit() takes no keyword argumentsz0setrecursionlimit() takes exactly one argument (z given)rz/recursion limit must be greater or equal than 1)	TypeError
ValueErrorrz__wrapped__RECURSIONLIMIT_DELTA)r*rBlimit)setrecursionlimitrrr@s
z:install_recursionlimit_wrappers.<locals>.setrecursionlimitz#            This IDLE wrapper adds z7 to prevent possible
            uninterruptible loops.cstS)N)rrr)getrecursionlimitrrrUsz:install_recursionlimit_wrappers.<locals>.getrecursionlimitz(            This IDLE wrapper subtracts z# to compensate
            for the z" IDLE adds when setting the limit.)	functoolswrapsrrrrrrr)rrrinstall_recursionlimit_wrappers<srcCsFttjddrBttjddrBtjjt_tjjt_tttdS)Nr)getattrrrrrrrrrr!uninstall_recursionlimit_wrappersds


rc@seZdZddZdS)rMcCsyWntk
rYntk
r:datYntj}td|dtd|dtdt	j
|dtd||dtdt||dtj
|dtd|dtd	|ddatYnXdS)
NTz)
----------------------------------------)rzUnhandled server exception!z
Thread: %szClient Address: z	Request: z#
*** Unrecoverable, server exiting!z(----------------------------------------)r;EOFErrorr5threadinterrupt_mainrr0r/r1Zcurrent_threadr)reprr>rmr:)selfr?Zclient_addressZerfrrrhandle_errorus&zMyRPCServer.handle_errorN)r
__module____qualname__rrrrrrMssrMc@sBeZdZdddZeddZeddZed	d
ZddZd
S)	StdioFileutf-8strictcCs||_||_||_||_dS)N)shelltags	_encoding_errors)rrrencodingerrorsrrr__init__szStdioFile.__init__cCs|jS)N)r)rrrrrszStdioFile.encodingcCs|jS)N)r)rrrrrszStdioFile.errorscCs
d|jS)Nz<%s>)r)rrrrr)szStdioFile.namecCsdS)NTr)rrrrisattyszStdioFile.isattyN)rr)	rrrrpropertyrrr)rrrrrrs

rc@seZdZddZddZdS)
StdOutputFilecCsdS)NTr)rrrrwritableszStdOutputFile.writablecCs<|jrtdt||j|j|j|j}|j||j	S)Nzwrite to closed file)
closedrstrencoderrdecoderrr)rrrrrrszStdOutputFile.writeN)rrrrrrrrrrsrc@s4eZdZdZddZdddZd
ddZd	d
ZdS)StdInputFiler'cCsdS)NTr)rrrrreadableszStdInputFile.readabler&cCs|jrtd|dkrd}nt|ts8tdt|j|j}d|_|dkrlxb|j	}|s^P||7}qNWnDx(t
||kr|j	}|sP||7}qnW||d|_|d|}|S)Nzread from closed filer&zmust be int, not r'r)rr
isinstancer-rrDr_line_bufferrreadlinerz)rrresultrrrrreads,


zStdInputFile.readcCs|jrtd|dkrd}nt|ts8tdt|j|jpF|j	}|dkrXt
|}|dd|}|dkrv|d}||d|_|d|S)Nzread from closed filer&zmust be int, not r
rI)rrrr-rrDrrrrrzfind)rrrZeolrrrrs
zStdInputFile.readlinecCs|jdS)N)rclose)rrrrrszStdInputFile.closeN)r&)r&)rrrrrrrrrrrrrs


rc@s,eZdZddZddZddZddZd	S)
rNcCst|}|d||d|_t|jdtjtjt_	t
|jdtjtjt_t
|jdtjdt_t
jt_ddl}|j|_tj	|_t|d|_t
jj|dd	d
dS)Nrwconsolestdinstdoutrbackslashreplacerinterpg?)Zmyseqwait)	Executiveregisterget_remote_proxyrrrrrrrrrrrdisplayhookpydocZ
plainpagerZpagerZ_keep_stdinrr
RPCHandlerZgetresponse)rZ	executiverrrrhandles zMyHandler.handlecCstddS)N
)rKrL)rrrrexithookszMyHandler.exithookcCsdatdS)NT)r:rr)rrrrEOFhook	szMyHandler.EOFhookcCsdatdS)NT)r:rr)rrrrdecode_interrupthookszMyHandler.decode_interrupthookN)rrrrrrrrrrrrNsrNc@sNeZdZddZddZddZddZd	d
ZddZd
dZ	dddZ
dS)rcCs&||_tj|_t|_t|_dS)N)r{__main____dict__localsrZCalltiprZAutoComplete)rr{rrrrs
zExecutive.__init__c
Csy&d|_dazt||jWddaXWntk
r}z<|jrp|jd}t|tdtfspt	dt
|tjdWdd}~XYnJt
|_trtt|jjd}|r|jjYnXtdS)NTFrzSystemExit: )rz<<toggle-jit-stack-viewer>>)usr_exc_info
interruptablerwrr;r*rrDr-r/rrrr<r:r6r=r{rZgetvarrZopen_remote_stack_viewerrp)rcodeeZobZjitrrrruncodes(

&
zExecutive.runcodecCstrtdS)N)rrr)rrrrinterrupt_the_server8szExecutive.interrupt_the_servercCst|j|S)N)rZstart_debuggerr{)rZgui_adap_oidrrrstart_the_debugger<szExecutive.start_the_debuggercCs|j|dS)N)r{Z
unregister)rZidb_adap_oidrrrstop_the_debugger?szExecutive.stop_the_debuggercCs|j|S)N)rZ	fetch_tip)rr)rrrget_the_calltipCszExecutive.get_the_calltipcCs|j||S)N)rZfetch_completions)rZwhatmoderrrget_the_completion_listFsz!Executive.get_the_completion_listNcCsr|jr|j\}}}ndSd}|dk	r0|j|}x|rN|jjddkrN|j}q2W|t_|t_t	
||}t|S)Nr)rrun)
rr{rtb_frame	f_globalstb_nextrrqrrrZ
StackTreeItemrZremote_object_tree_item)rZ	flist_oidrfrurFflistitemrrrrIs
zExecutive.stackviewer)N)rrrrrrrrrrrrrrrrsrr)rGzidlelib.idle_test.test_run)	verbosity)N)NN)F)>riorr9rrrKr>_threadrr1rZidlelibrrrrrrrrrVhasattrmodulesmoddelattrr	r3rrrr!ZTclr$r%r5r:rrGr2rOr=rcrpr6rWrrrrZ	RPCServerrM
TextIOBaserrrrrNobjectrrZunittestrrrr<module>sr







M$(!1-C