B
„ fEO ã @ s@ d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z
ddlZddlZddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ dd l
mZ ddlZddlZeejd
dƒ�sx"dD ]Zeeeƒ ejd
e = qØW dejd
_dZdAdd„ZdBdd„Zdadd„ Z e dƒ e !¡ Z"e"fdd„Z#da$da%da&dCdd„Z'dd„ Z(dd„ Z)dd „ Z*d!d"„ Z+d#d$„ Z,d%d&„ Z-d'd(„ Z.d)d*„ Z/d+Z0d,d-„ Z1d.d/„ Z2G d0d1„ d1ej3ƒZ4G d2d3„ d3ej5ƒZ6G d4d5„ d5e6ƒZ7G d6d7„ d7e6ƒZ8G d8d9„ d9ej9ƒZ:G d:d;„ d;e;ƒZm'Z' e'd>d?d@� e dƒ dS )Dz× idlelib.run
Simplified, pyshell.ModifiedInterpreter spawns a subprocess with
f'''{sys.executable} -c "__import__('idlelib.run').run.main()"'''
'.run' is needed because __import__ returns idlelib, not idlelib.run.
é N)Úautocomplete)Úcalltip)Ú
debugger_r)Ú
debugobj_r)Úiomenu)Úrpc)Ústackviewerzidlelib.runÚfirstrun)ZsimpledialogZ
messageboxÚfontZdialogZ
filedialogZcommondialogZttkztkinter.Fz 127.0.0.1c C sV d}|d||f 7 }|dkr(t ||¡}| ¡ }|r@|d| 7 }|d|j| f 7 }|S )zFormat warnings the IDLE way.z!
Warning (from warnings module):
z File "%s", line %s
Nz %s
z%s: %s
)Ú linecacheÚgetlineÚstripÚ__name__)ÚmessageÚcategoryÚfilenameÚlinenoÚlineÚs© r ú0/opt/alt/python37/lib64/python3.7/idlelib/run.pyÚidle_formatwarning* s r c C sB |dkrt j}y| t| ||||ƒ¡ W n tk
r< Y nX dS )zuShow Idle-format warning after replacing warnings.showwarning.
The only difference is the formatter called.
N)ÚsysÚstderrÚwriter ÚOSError)r r r r Úfiler r r r Úidle_showwarning_subproc7 s r c C s0 | rt dkr,tja tt_nt dk r,t t_da dS )zFReplace warning.showwarning with idle_showwarning_subproc, or reverse.N)Ú_warnings_showwarningÚwarningsÚshowwarningr )Zcapturer r r Úcapture_warningsG s r! Tc C s | d¡ dS )z–Process any tk events that are ready to be dispatched if tkinter
has been imported, a tcl interpreter has been created and tk has been
loaded.ÚupdateN)Úeval)Útclr r r Úhandle_tk_eventsW s r% c C s¤ | a yttjd ƒ}W n tdtjd� dS tdƒ dgtjdd…<