a
    åzeá  ã                
   @   sú  d dl Z edkr e jd e jd< zd dlT W n( eyT   ede jd edƒ‚Y n0 e jdkršz d dl	Z	dZ
e	 d	¡ e
¡ W n eeefy˜   Y n0 d d
lmZ edk rìeƒ at ¡  d dlmZ etƒ ejdde td edƒ‚d dlmZ d dlZd dlZd dlZd dlmZ d dlZd dlZd dlZd dl m!Z! d dl"Z"d dl#Z#d dl$Z$d dl%Z%d dl&m'Z' d dl(m)Z) d dl*m+Z+ d dl*m,Z, d dl-m.Z.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl*m4Z4 d dlm5Z5m6Z6m7Z7 d dl8m9Z9 dZ:d Z;zdZ<e<e=_<e<e>_<W n e?y   Y n0 e ja@d<dd „ZAdaBd!d"„ ZCeCd#ƒ dejDfd$d%„ZEeEe_DG d&d'„ d'e.ƒZFG d(d)„ d)e1ƒZGG d*d+„ d+e'ƒZHG d,d-„ d-e9ƒZIG d.d/„ d/e4jJƒZKd0d1„ ZLG d2d3„ d3eƒZMG d4d5„ d5e3ƒZNd6d7„ ZOd8ZPd9d:„ ZQedkrîeQƒ  eCd;ƒ dS )=é    NÚ__main__zidlelib.pyshell)Ú*zJ** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **©Úfileé   Úwin32Zshcore)Ú
messageboxg      !@©Úfix_scalingzIdle Cannot Startz"Idle requires tcl/tk 8.5+, not %s.©Úparent)ÚInteractiveInterpreter)Úpython_version)ÚTextWrapper)ÚColorDelegator)ÚidleConf©Údebugger)Ú
debugger_r)ÚEditorWindowÚfixwordbreaks)ÚFileList)ÚOutputWindow)Úrpc)Úidle_formatwarningÚStdInputFileÚStdOutputFile)ÚUndoDelegatorz	127.0.0.1zCtrl-D (end-of-file)c              	   C   sN   |d u rt }z&| t| ||||d¡ | d¡ W n ttfyH   Y n0 d S )N)Úlineú>>> )Úwarning_streamÚwriter   ÚAttributeErrorÚOSError)ÚmessageÚcategoryÚfilenameÚlinenor   r   © r(   ú%/usr/lib/python3.9/idlelib/pyshell.pyÚidle_showwarningL   s    
ÿr*   c                 C   s0   | rt d u r,tja tt_nt d ur,t t_d a d S ©N)Ú_warnings_showwarningÚwarningsÚshowwarningr*   )Úcapturer(   r(   r)   Úcapture_warnings_   s    r0   Tc                 C   sX   t j}i }t|ƒD ].}|d d… |dd …  dkr| |¡||< q|| ƒ | |¡ d S ©Nr   éÿÿÿÿz<>)Ú	linecacheÚcacheÚlistÚpopÚupdate)r&   Zorig_checkcacher4   ÚsaveÚkeyr(   r(   r)   Úextended_linecache_checkcachen   s    r:   c                   @   sr   e Zd Zdd„ Zg d¢Zddd„Zdd„ Zdd
d„Zddd„Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zd	S )ÚPyShellEditorWindowc                 G   s–   g | _ tj| g|¢R Ž  | j d| j¡ | j d| j¡ | j d| jj¡ t	j
 tjd¡| _| jj| fdd„}| j |¡ | jjrŠ|  ¡  |  ¡  d S )Nú<<set-breakpoint-here>>ú<<clear-breakpoint-here>>z<<open-python-shell>>zbreakpoints.lstc                 S   s   |  ¡  | ƒ  d S r+   )Úrestore_file_breaks)Zold_hookÚselfr(   r(   r)   Úfilename_changed_hook“   s    z;PyShellEditorWindow.__init__.<locals>.filename_changed_hook)Úbreakpointsr   Ú__init__ÚtextÚbindÚset_breakpoint_hereÚclear_breakpoint_hereÚflistÚ
open_shellÚosÚpathÚjoinr   ZuserdirÚbreakpointPathÚioZfilename_change_hookZset_filename_change_hookr&   r>   Úcolor_breakpoint_text)r?   Úargsr@   r(   r(   r)   rB   ˆ   s    ÿÿ
zPyShellEditorWindow.__init__))ZCutz<<cut>>Úrmenu_check_cut)ZCopyz<<copy>>Zrmenu_check_copy)ZPastez	<<paste>>Úrmenu_check_paste)NNN)zSet Breakpointr<   N)zClear Breakpointr=   NTc                 C   sD   | j d u rd S |r(t ¡ }t |d¡}n
dddœ}| j d|¡ d S )NÚbreakÚ )Ú
foregroundÚ
backgroundÚBREAK)rM   r   ÚCurrentThemeÚGetHighlightrC   Z
tag_config)r?   ZcolorÚthemeZcfgr(   r(   r)   rN   ¥   s    

z)PyShellEditorWindow.color_breakpoint_textc                 C   s†   | j }| jj}| dd| d|d  ¡ z| j |¡ W n tyV   | j |¡ Y n0 z| jj	j
j}| ||¡ W n   Y n0 d S )NrV   z%d.0r   )rC   rM   r&   Útag_addrA   ÚindexÚ
ValueErrorÚappendrG   ÚpyshellÚinterpr   rE   )r?   r'   rC   r&   Údebugr(   r(   r)   Úset_breakpoint±   s    z"PyShellEditorWindow.set_breakpointNc                 C   s>   | j }| jj}|s| ¡  d S tt| d¡ƒƒ}|  |¡ d S )NÚinsert)rC   rM   r&   ÚbellÚintÚfloatr[   ra   )r?   ÚeventrC   r&   r'   r(   r(   r)   rE   ¿   s    z'PyShellEditorWindow.set_breakpoint_herec                 C   sŠ   | j }| jj}|s| ¡  d S tt| d¡ƒƒ}z| j |¡ W n   Y n0 | 	ddd¡ z| j
jjj}| ||¡ W n   Y n0 d S )Nrb   rV   úinsert linestartzinsert lineend +1char)rC   rM   r&   rc   rd   re   r[   rA   ÚremoveÚ
tag_removerG   r^   r_   r   rF   )r?   rf   rC   r&   r'   r`   r(   r(   r)   rF   È   s$    ÿz)PyShellEditorWindow.clear_breakpoint_herec                 C   sd   | j r`| j}| jj}|s$| ¡  d S g | _ | ddt¡ z| jjj	j
}| |¡ W n   Y n0 d S )NrV   ú1.0)rA   rC   rM   r&   rc   ri   ZENDrG   r^   r_   r   Úclear_file_breaks)r?   rC   r&   r`   r(   r(   r)   rk   Û   s    z%PyShellEditorWindow.clear_file_breaksc              
   C   s:  | j }| jj}z8t| jdƒ}| ¡ }W d   ƒ n1 s:0    Y  W n ty\   g }Y n0 z~t| jdƒ^}|D ]}| |d ¡sr| |¡ qr|  	¡  | j }|r¼| |d t
|ƒ d ¡ W d   ƒ n1 sÐ0    Y  W nX ty4 } z>t| jddƒs d| j_tjdd	t
|ƒ | jd
 W Y d }~n
d }~0 0 d S )NÚrÚwú=Ú
Úbreakpoint_error_displayedFTz
IDLE Errorz$Unable to update breakpoint list:
%s)Útitler$   r   )rA   rM   r&   ÚopenrL   Ú	readlinesr#   Ú
startswithr!   Úupdate_breakpointsÚstrÚgetattrÚrootrp   r   Ú	showerrorrC   )r?   Zbreaksr&   ÚfpÚlinesZnew_filer   Úerrr(   r(   r)   Ústore_file_breaksê   s2    *
<ÿýz%PyShellEditorWindow.store_file_breaksc                 C   s¶   | j  ¡  | jd u rd S | jj}|d u r,d S tj | j¡r²t| jdƒ}| 	¡ }W d   ƒ n1 sd0    Y  |D ]>}| 
|d ¡rrt|t|ƒd d … ƒ}|D ]}|  |¡ q qrd S )Nrl   rn   r   )rC   r7   rM   r&   rI   rJ   ÚisfilerL   rr   rs   rt   ÚevalÚlenra   )r?   r&   rz   r{   r   Zbreakpoint_linenumbersZbreakpoint_linenumberr(   r(   r)   r>     s    

&z'PyShellEditorWindow.restore_file_breaksc                 C   s$   | j }| d¡}|  |¡}|| _d S )NrV   )rC   Z
tag_rangesÚranges_to_linenumbersrA   )r?   rC   ÚrangesZlinenumber_listr(   r(   r)   ru   %  s    

z&PyShellEditorWindow.update_breakpointsc                 C   sb   g }t dt|ƒdƒD ]H}tt|| jƒƒ}tt||d  jƒƒ}||k r| |¡ |d7 }q@q|S )Nr   é   r   )Úranger€   rd   re   Ústringr]   )r?   r‚   r{   r[   r'   Úendr(   r(   r)   r   ,  s    
z)PyShellEditorWindow.ranges_to_linenumbersc                 C   s   |   ¡  t | ¡ d S r+   )rk   r   Ú_close©r?   r(   r(   r)   r‡   =  s    zPyShellEditorWindow._close)T)N)N)Ú__name__Ú
__module__Ú__qualname__rB   Úrmenu_specsrN   ra   rE   rF   rk   r}   r>   ru   r   r‡   r(   r(   r(   r)   r;   …   s   	

	
*r;   c                   @   s   e Zd ZeZdZddd„ZdS )ÚPyShellFileListNc                 C   s8   | j r| j j ¡  nt| ƒ| _ | j r2| j  ¡ s2d S | j S r+   )r^   ÚtopÚwakeupÚPyShellÚbegin©r?   rf   r(   r(   r)   rH   L  s    

zPyShellFileList.open_shell)N)r‰   rŠ   r‹   r;   r   r^   rH   r(   r(   r(   r)   r   C  s   r   c                   @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
ÚModifiedColorDelegatorc                 C   s   t  | ¡ |  ¡  d S r+   )r   rB   ÚLoadTagDefsrˆ   r(   r(   r)   rB   Z  s    
zModifiedColorDelegator.__init__c                 C   s*   |   ddd¡ |  ddd¡ t | ¡ d S )NZTODOrj   ÚiomarkZSYNC)ri   rZ   r   Úrecolorize_mainrˆ   r(   r(   r)   r–   ^  s    z&ModifiedColorDelegator.recolorize_mainc              	   C   sJ   t  | ¡ t ¡ }| j d d dœt |d¡t |d¡t |d¡dœ¡ d S )N)rU   rT   ÚstdoutÚstderrÚconsole)Ústdinr—   r˜   r™   )r   r”   r   rW   Útagdefsr7   rX   )r?   rY   r(   r(   r)   r”   c  s    



üz"ModifiedColorDelegator.LoadTagDefsc                 C   s   | j D ]}|  |dd¡ qd S )Nr•   r†   )r›   ri   )r?   Útagr(   r(   r)   Úremovecolorsm  s    
z#ModifiedColorDelegator.removecolorsN)r‰   rŠ   r‹   rB   r–   r”   r   r(   r(   r(   r)   r“   W  s   
r“   c                   @   s    e Zd Zddd„Zddd„ZdS )ÚModifiedUndoDelegatorNc                 C   sL   z$| j  |dd¡r"| j  ¡  W d S W n ty6   Y n0 t | |||¡ d S ©Nú<r•   )ÚdelegateÚcomparerc   ÚTclErrorr   rb   )r?   r[   ÚcharsÚtagsr(   r(   r)   rb   u  s    

zModifiedUndoDelegator.insertc                 C   sJ   z$| j  |dd¡r"| j  ¡  W d S W n ty6   Y n0 t | ||¡ d S rŸ   )r¡   r¢   rc   r£   r   Údelete)r?   Zindex1Úindex2r(   r(   r)   r¦   ~  s    

zModifiedUndoDelegator.delete)N)N)r‰   rŠ   r‹   rb   r¦   r(   r(   r(   r)   rž   r  s   
	rž   c                   @   s   e Zd Zdd„ ZdS )ÚMyRPCClientc                 C   s   t ‚d S r+   )ÚEOFErrorrˆ   r(   r(   r)   Ú
handle_EOFŠ  s    zMyRPCClient.handle_EOFN)r‰   rŠ   r‹   rª   r(   r(   r(   r)   r¨   ˆ  s   r¨   c                 C   s^   d|pd› d}| t |ƒkrNt| t |ƒ dƒ\}}|| d › |› |d › S |d d… S d S )Nz= RESTART: ZShellz =rƒ   rn   éþÿÿÿ)r€   Údivmod)Úwidthr&   rœ   ZdivÚmodr(   r(   r)   Úrestart_lineŽ  s
    r¯   c                   @   s  e Zd Zdd„ ZdZdZdZdd„ Zdd„ Zdd	„ Z	d?dd„Z
dd„ Zdd„ Zdd„ Zdd„ Zd@dd„ZdZdd„ ZdZdd„ Zdd„ Zdd„ Zd d!„ Zd"Zd#d$„ ZdAd%d&„Zd'd(„ Zd)d*„ Zd+d,„ ZdBd-d.„Zd/d0„ Zd1d2„ Zd3d4„ Z d5d6„ Z!d7d8„ Z"d9d:„ Z#d;d<„ Z$d=d>„ Z%dS )CÚModifiedInterpreterc                 C   sB   || _ tjd j}tj| |d d| _d | _t| _	| j
jj| _d S )Nr   )ÚlocalsF)Ú	tkconsoleÚsysÚmodulesÚ__dict__r   rB   Ú
restartingÚsubprocess_arglistÚPORTÚportÚcompileÚcompilerÚflagsÚoriginal_compiler_flags)r?   r²   r±   r(   r(   r)   rB   ž  s    zModifiedInterpreter.__init__Nc                 C   s&   | j d u r|  ¡ | _ t | j ¡| _d S r+   )r·   Úbuild_subprocess_arglistÚ
subprocessÚPopenÚ
rpcsubprocrˆ   r(   r(   r)   Úspawn_subprocess«  s    

z$ModifiedInterpreter.spawn_subprocessc                 C   sJ   dd„ t jD ƒ}tjdddddd}d	|f }t jg| d
|t| jƒg S )Nc                 S   s   g | ]}d | ‘qS )z-Wr(   )Ú.0Úsr(   r(   r)   Ú
<listcomp>³  ó    z@ModifiedInterpreter.build_subprocess_arglist.<locals>.<listcomp>ÚmainÚGeneralzdelete-exitfuncFÚbool)ÚdefaultÚtypez&__import__('idlelib.run').run.main(%r)ú-c)r³   Úwarnoptionsr   Ú	GetOptionÚ
executablerv   r¹   )r?   rm   Z	del_exitfZcommandr(   r(   r)   r¾   °  s    
ÿ
z,ModifiedInterpreter.build_subprocess_arglistc              	   C   sX  t | jf}tdƒD ]6}t |¡ zt|ƒ| _W  qVW q tyF   Y q0 q|  ¡  d S | jj	 
¡ d | _tdkr†| jj	 tjtjd¡ |  ¡  | jj	 d¡ z| j ¡  W n tjyÈ   |  ¡  Y d S 0 | j d| j¡ | j d| jj¡ | j d| jj¡ | j d| jj¡ | j d	| jj¡ | j d
t¡ | j d| ¡ | jdd |  ¡  | jS )Né   r   r   é
   r™   rš   r—   r˜   rG   r3   r_   T©Úwith_cwd)ÚHOSTr¹   r„   ÚtimeÚsleepr¨   Úrpccltr#   Údisplay_port_binding_errorÚlistening_sockÚgetsocknamer¸   Ú
setsockoptÚsocketÚ
SOL_SOCKETÚSO_REUSEADDRrÂ   Ú
settimeoutÚacceptÚtimeoutÚdisplay_no_subprocess_errorÚregisterr²   rš   r—   r˜   rG   r3   Útransfer_pathÚpoll_subprocess)r?   ÚaddrÚir(   r(   r)   Ústart_subprocess¼  s@    



ÿz$ModifiedInterpreter.start_subprocessFrS   c                 C   s0  | j r| jS d| _ |  ¡ }|r<zt | j¡ W n   Y n0 | j ¡  |  ¡  | j}|j}d|_|  	¡  z| j 
¡  W n tjy”   |  ¡  Y d S 0 | j|d | ¡  |j dd¡ | d¡ | t|j|ƒ¡ |j dd¡ |j dd¡ | sþ| ¡  |rt | j¡ | ¡  | j| jj_d| _ | jS )	NTFrÒ   r•   úend-1cro   ÚrestartÚleft)r¶   r×   Úgetdebuggerr   Zclose_subprocess_debuggerÚcloseÚterminate_subprocessr²   Ú	executingrÂ   rà   rÜ   rá   râ   rä   Ústop_readlinerC   r¦   r!   r¯   r­   Úmark_setÚmark_gravityÚ
showpromptZrestart_subprocess_debuggerÚload_breakpointsr½   rº   r»   r¼   )r?   rÓ   r&   r`   r™   Zwas_executingr(   r(   r)   Úrestart_subprocessç  sF    

z&ModifiedInterpreter.restart_subprocessc                 C   s   | j  dddi ¡ d S )NÚexecZinterrupt_the_serverr(   )r×   Z
remotecallrˆ   r(   r(   r)   Z__request_interrupt  s    z'ModifiedInterpreter.__request_interruptc                 C   s   t j| jd ¡  d S )N)Útarget)Ú	threadingÚThreadÚ'_ModifiedInterpreter__request_interruptÚstartrˆ   r(   r(   r)   Úinterrupt_subprocess  s    z(ModifiedInterpreter.interrupt_subprocessc                 C   sz   | j d ur| jj | j ¡ z| jj ¡  W n ty<   Y n0 z| j ¡  W n ty^   Y n0 |  ¡  d| j_	d | _d S ©NF)
Ú_afteridr²   rC   Zafter_cancelr×   rÙ   rí   r"   rî   rï   rˆ   r(   r(   r)   Úkill_subprocess  s    
z#ModifiedInterpreter.kill_subprocessc                 C   sL   z| j  ¡  W n ty"   Y d S 0 z| j  ¡  W n tyF   Y d S 0 d S r+   )rÁ   Úkillr#   Úwaitrˆ   r(   r(   r)   rî   (  s    z(ModifiedInterpreter.terminate_subprocessc                 C   s2   |rdg}|  tj¡ ntj}|  d|f ¡ d S )NrS   zRif 1:
        import sys as _sys
        _sys.path = %r
        del _sys
        
)Úextendr³   rJ   Ú
runcommand)r?   rÓ   rJ   r(   r(   r)   rä   5  s    üz!ModifiedInterpreter.transfer_pathc              
   C   s4  | j }|d u rd S z|j| jdd}W n2 tttfyX   | jjrHY d S d }|  ¡  Y n0 |r| j 	¡  d | _|\}}| jj
}|dkr¢|d urêtt|ƒ|d nH|dkrÀ| j d¡rê|  ¡  n*|dkrêd}t||tjd t|||d z| j ¡  W n ty   Y n0 | jjs0| jj | jj| j¡| _d S )	Ngš™™™™™©?)r  ZOKr   Z	EXCEPTIONú<<toggle-jit-stack-viewer>>ÚERRORz/pyshell.ModifiedInterpreter: Subprocess ERROR:
)r×   ZpollresponseÚ
active_seqr©   r#   ÚKeyboardInterruptr²   Úclosingrõ   Úresetoutputr™   ÚprintÚreprÚgetvarÚremote_stack_viewerr³   Ú
__stderr__Úendexecutingr"   rC   ÚafterÚpollintervalrå   rþ   )r?   ZcltÚresponseÚhowZwhatr™   Úerrmsgr(   r(   r)   rå   D  sB    



ÿz#ModifiedInterpreter.poll_subprocessc                 C   s
   || _ d S r+   r   )r?   r   r(   r(   r)   Úsetdebuggerl  s    zModifiedInterpreter.setdebuggerc                 C   s   | j S r+   r   rˆ   r(   r(   r)   rì   o  s    zModifiedInterpreter.getdebuggerc                 C   s   | j j d| j¡ d S )Ni,  )r²   rC   r  r  rˆ   r(   r(   r)   Úopen_remote_stack_viewerr  s    
z,ModifiedInterpreter.open_remote_stack_viewerc                 C   s°   ddl m} | j dddi ¡}|d u r6| jj ¡  d S | | j|¡}ddlm	}m
} t| jjƒ}t ¡ }t |d¡d }|||dd	}	|	jjd
dd ||	jd |ƒ}
|
 ¡  d S )Nr   )Ú
debugobj_rrö   Zstackviewer)rG   )ÚScrolledCanvasÚTreeNodeÚnormalrU   )ÚbgZhighlightthicknessr   Zboth)ÚexpandÚfill)Úidlelibr  r×   Úremotequeuer²   rx   rc   ZStubObjectTreeItemZidlelib.treer  r  ZToplevelr   rW   rX   ÚframeÚpackZcanvasr  )r?   r  ZoidÚitemr  r  rŽ   rY   rU   ZscZnoder(   r(   r)   r    s    z'ModifiedInterpreter.remote_stack_viewerr   c                 C   s   |   |¡}|  ||¡ d S r+   )ÚstuffsourceÚexecfile©r?   Úsourcer&   r(   r(   r)   Ú
execsource’  s    
zModifiedInterpreter.execsourcec              	   C   sÀ   |d u rZt  |¡8}| ¡ }tr<dtj |¡› d| d }W d   ƒ n1 sP0    Y  zt||dƒ}W nF tt	fy°   | j
 ¡  td| j
jd t | |¡ | j
 ¡  Y n0 |  |¡ d S )Nz__file__ = r'''z'''
z
del __file__rö   zB*** Error in script or command!
Traceback (most recent call last):r   )Útokenizerr   ÚreadÚuse_subprocessrI   rJ   Úabspathrº   ÚOverflowErrorÚSyntaxErrorr²   r	  r
  r˜   r   Úshowsyntaxerrorró   Úruncode)r?   r&   r&  rz   Úcoder(   r(   r)   r$  —  s&    ÿÿ"
þzModifiedInterpreter.execfilec                 C   s   |   |¡}t | ||¡S r+   )r#  r   Ú	runsourcer%  r(   r(   r)   r1  «  s    
zModifiedInterpreter.runsourcec                 C   s>   d| j  }| j d | _ | d¡}t|ƒd d||ftj|< |S )Nz<pyshell#%d>r   ro   r   )ÚgidÚsplitr€   r3   r4   )r?   r&  r&   r{   r(   r(   r)   r#  ´  s
    

zModifiedInterpreter.stuffsourcec                 C   s   |   d|f ¡ d S )Na(  if 1:
            _filename = %r
            import sys as _sys
            from os.path import dirname as _dirname
            _dir = _dirname(_filename)
            if not _dir in _sys.path:
                _sys.path.insert(0, _dir)
            del _filename, _sys, _dirname, _dir
            
)r  ©r?   r&   r(   r(   r)   Úprepend_syspath¼  s    øz#ModifiedInterpreter.prepend_syspathc                 C   sÄ   | j }|j}| ddd¡ t ¡ \}}}t|ddƒp:|p:d}t|ddƒpJd}t|d	dƒpZd
}	|	d
krl|d7 }|dkr‚d|	d  }
nd|d |	d f }
| ||
¡ | ¡  |  d| ¡ | 	¡  d S )Nr  rj   r†   ÚmsgrS   z<no detail available>r'   r   Úoffsetr   ziomark + %d charsz&iomark linestart + %d lines + %d charszSyntaxError: %s
)
r²   rC   ri   r³   Úexc_inforw   Zcolorize_syntax_errorr	  r!   ró   )r?   r&   r²   rC   rË   ÚvalueÚtbr6  r'   r7  Úposr(   r(   r)   r.  È  s$    ÿz#ModifiedInterpreter.showsyntaxerrorc                 C   s6   | j  ¡  |  ¡  t | ¡ | j  d¡r2| j  ¡  d S )Nr  )r²   r	  Úchecklinecacher   Úshowtracebackr  Úopen_stack_viewerrˆ   r(   r(   r)   r=  â  s
    

z!ModifiedInterpreter.showtracebackc                 C   s>   t j}t| ¡ ƒD ]&}|d d… |dd …  dkr||= qd S r1   )r3   r4   r5   Úkeys)r?   Úcr9   r(   r(   r)   r<  ê  s    z"ModifiedInterpreter.checklinecachec                 C   s@   | j jr|  ¡  dS | jr0| j dd|fi ¡ nt|| jƒ dS )Nr   rö   r/  r   )r²   rï   Údisplay_executing_dialogr×   r  rö   r±   )r?   r0  r(   r(   r)   r  ð  s    zModifiedInterpreter.runcommandc                 C   st  | j jr|  ¡  |  ¡  | j}z"zT| j  ¡  |sT| jd urT| j dd|fi ¡| _n |rh| 	|| j
¡ nt|| j
ƒ W nž ty¶   | j js°tjddd| j jdr¦‚ q²|  ¡  n‚ Y n`   trätd| j jd |  ¡  | j  ¡  n,| j jrd	| j _td
| j jd n|  ¡  Y n0 W tspz| j  ¡  W n ty@   Y n0 n,tsnz| j  ¡  W n tyl   Y n0 0 d S )Nrö   r/  zExit?zDo you want to exit altogether?Zyes©rÊ   r   z IDLE internal error in runcode()r   Fr  )r²   rï   rõ   r<  r   Úbeginexecutingr×   Z
asyncqueuer  Úrunr±   rö   Ú
SystemExitr  r   ZaskyesnorC   r=  r*  r
  r˜   r  Úcanceledr"   )r?   r0  r   r(   r(   r)   r/  ü  sZ    

ÿü
ÿ
üzModifiedInterpreter.runcodec                 C   s   | j j |¡S r+   )r²   r˜   r!   )r?   rÄ   r(   r(   r)   r!   *  s    zModifiedInterpreter.writec                 C   s   t jdd| jjd d S )NzPort Binding ErroraA  IDLE can't bind to a TCP/IP port, which is necessary to communicate with its Python execution server.  This might be because no networking is installed on this computer.  Run IDLE with the -n command line switch to start without a subprocess and refer to Help/IDLE Help 'Running without a subprocess' for further details.r   ©r   ry   r²   rC   rˆ   r(   r(   r)   rØ   .  s
    øz.ModifiedInterpreter.display_port_binding_errorc                 C   s   t jdd| jjd d S )NzSubprocess Connection Errorz¢IDLE's subprocess didn't make connection.
See the 'Startup failure' section of the IDLE doc, online at
https://docs.python.org/3/library/idle.html#startup-failurer   rG  rˆ   r(   r(   r)   râ   9  s
    ûz/ModifiedInterpreter.display_no_subprocess_errorc                 C   s   t jdd| jjd d S )NzAlready executingzYThe Python Shell window is already executing a command; please wait until it is finished.r   rG  rˆ   r(   r(   r)   rA  A  s
    üz,ModifiedInterpreter.display_executing_dialog)FrS   )F)N)N)&r‰   rŠ   r‹   rB   rþ   r×   rÁ   rÂ   r¾   rè   rõ   rú   rü   rÿ   rî   rä   r  rå   r   r  rì   r  r  r2  r'  r$  r1  r#  r5  r.  r=  r<  r  r/  r!   rØ   râ   rA  r(   r(   r(   r)   r°   œ  sF   	+
,
&
	
.r°   c                       s’  e Zd Zdeƒ  ZeZeZg d¢Z	e
jdg ZdZddlmZ dPdd	„Zd
d„ ZdZdZdZdZdZdZdd„ Zdd„ ZdQdd„Zdd„ ZdRdd„Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Z d d!„ Z!d"d#„ Z"d$d%„ Z#d&d'„ Z$d(Z%d)d*„ Z&d+d,„ Z'd-d.„ Z(d/d0„ Z)dSd1d2„Z*d3d4„ Z+d5d6„ Z,d7d8„ Z-d9d:„ Z.d;d<„ Z/dTd=d>„Z0dUd?d@„Z1dVdAdB„Z2dCdD„ Z3dEdF„ Z4dGdH„ Z5dWdJdK„Z6‡ fdLdM„Z7‡ fdNdO„Z8‡  Z9S )Xr   zIDLE Shell ))r   Z_File)ZeditZ_Edit)r`   Z_Debug)ÚoptionsZ_Options)ZwindowZ_Window)ÚhelpZ_Help)ZSqueezeú<<squeeze-current-text>>Fr   )ÚHistoryNc                 C   s$  t r&| j}|d d dkr&| dd¡ t| ƒ| _|d u rVtƒ }t|ƒ | ¡  t|ƒ}t	 
| |d d ¡ d| _d| _ttdƒr‚tjnd| _| j d	¡d
 | _| j| _| j}|jdd | d| j¡ | d| j¡ | d| j¡ | d| j¡ | d| j¡ | d| j¡ | d| j¡ t r8| d| j¡ | d| j¡ |   | ¡}| d|j!¡ tj"| _#tj$| _%tj&| _'ddl(m)} t*| d|j+|j,ƒ| _&t-| d|j+|j,ƒ| _"t-| d|j+dƒ| _$t-| d|j+|j,ƒ| _.t sà| j"t_"| j$t_$| j&t_&zdd l/}|j0|_1W n   tj2t_$‚ Y n0 |  3| j¡| _4d| _5d S )Nrƒ   r   Úshell)rL  ZShe_llTé   Úps1r   ro   r2   Úchar)Úwrapz<<newline-and-indent>>z<<plain-newline-and-indent>>z<<interrupt-execution>>z<<end-of-file>>z<<open-stack-viewer>>ú<<toggle-debugger>>r  z<<view-restart>>z<<restart-shell>>rJ  )Úiomenurš   r—   r˜   Úbackslashreplacer™   é2   )6r*  Ú
menu_specsrb   r°   r_   ÚTkr   Úwithdrawr   r   rB   ZusetabsZindentwidthÚhasattrr³   rN  Úsys_ps1r3  Zprompt_last_lineÚpromptrC   Z	configurerD   Úenter_callbackÚlinefeed_callbackÚcancel_callbackÚeof_callbackr>  Útoggle_debuggerÚtoggle_jit_stack_viewerÚview_restart_markÚrestart_shellZSqueezerZsqueeze_current_text_eventr—   Úsave_stdoutr˜   Úsave_stderrrš   Ú
save_stdinr  rR  r   ÚencodingÚerrorsr   r™   ÚpydocZ
plainpagerZpagerr  rK  Úhistoryr  )r?   rG   Úmsrx   rC   ZsqueezerrR  rh  r(   r(   r)   rB   e  sx    

ÿÿÿÿÿzPyShell.__init__c                 C   s   t jddS )NT)Z
shell_only)r   ZGetExtensionsrˆ   r(   r(   r)   Úget_standard_extension_names¨  s    z$PyShell.get_standard_extension_namesc                 C   s   |a d S r+   ©r    )r?   Ústreamr(   r(   r)   Úset_warning_stream²  s    zPyShell.set_warning_streamc                 C   s   t S r+   rl  rˆ   r(   r(   r)   Úget_warning_stream¶  s    zPyShell.get_warning_streamc                 C   sH   | j r$tjdd| jd |  ¡  dS | j ¡ }|r<|  ¡  n|  ¡  d S )NzDon't debug nowz*You can only toggle the debugger when idler   rR   )	rï   r   ry   rC   Úset_debugger_indicatorr_   rì   Úclose_debuggerÚopen_debugger)r?   rf   Údbr(   r(   r)   r_  ¹  s    þ

zPyShell.toggle_debuggerc                 C   s   | j  ¡ }|  d|  ¡ d S )NrQ  )r_   rì   Zsetvar©r?   rs  r(   r(   r)   rp  Ç  s    
zPyShell.set_debugger_indicatorc                 C   s   d S r+   r(   r’   r(   r(   r)   r`  Ë  s    zPyShell.toggle_jit_stack_viewerc                 C   sh   | j  ¡ }|r\| j  d ¡ | ¡  | j jr8t | j j¡ |  ¡  | j 	d¡ | j
| _|  ¡  |  ¡  d S )Nz[DEBUG OFF]
)r_   rì   r  rí   r×   r   Zclose_remote_debuggerr	  r™   r!   rY  rZ  ró   rp  rt  r(   r(   r)   rq  Î  s    
zPyShell.close_debuggerc                 C   sX   | j jrt | j j| ¡}n
t | ¡}| j  |¡ | ¡  d| j | _	|  
¡  |  ¡  d S )Nz[DEBUG ON]
)r_   r×   r   Zstart_remote_debuggerr   ZDebuggerr  rô   rY  rZ  ró   rp  )r?   Zdbg_guir(   r(   r)   rr  Û  s    
ÿ
zPyShell.open_debuggerc                 C   s    | j r
dnd}|  dd|¡ d S )NÚdisabledr  r`   z*tack*iewer)rï   Zupdate_menu_state)r?   Ústater(   r(   r)   Údebug_menu_postcommandç  s    zPyShell.debug_menu_postcommandc                 C   s   |   ¡  d| _d S ©NT)r	  rï   rˆ   r(   r(   r)   rC  ë  s    zPyShell.beginexecutingc                 C   s   d| _ d| _|  ¡  d S rý   )rï   rF  ró   rˆ   r(   r(   r)   r  ð  s    zPyShell.endexecutingc                 C   sD   | j r&tjddd| jd}|du r&dS |  ¡  d| _d| _t | ¡S )NzKill?z7Your program is still running!
 Do you want to kill it?ÚokrB  FÚcancelT)	rï   r   ZaskokcancelrC   rð   rF  r  r   rí   )r?   r  r(   r(   r)   rí   ö  s    üzPyShell.closec                 C   sV   |   ¡  tr| j ¡  | jt_| jt_| j	t_
d | _d | _d | j_d | _t | ¡ d S r+   )rq  r*  r_   rÿ   rc  r³   r—   rd  r˜   re  rš   r™   rG   r^   ri  r   r‡   rˆ   r(   r(   r)   r‡     s    
zPyShell._closec                 C   s   dS rx  r(   r4  r(   r(   r)   Úispythonsource  s    zPyShell.ispythonsourcec                 C   s   | j S r+   )Úshell_titlerˆ   r(   r(   r)   Úshort_title  s    zPyShell.short_titlezHType "help", "copyright", "credits" or "license()" for more information.c                 C   sŒ   | j  dd¡ |  ¡  tr:d}| j ¡ }|sF|  ¡  dS nd}tjt	_|  
dt	jt	j| j|f ¡ | j  ¡  |  ¡  dd l}d|_d |_dS )	Nr•   rb   rS   Fz›==== No Subprocess ====

WARNING: Running IDLE without a Subprocess is deprecated
and will be removed in a later version. See Help/IDLE Help
for details.

zPython %s on %s
%s
%sr   T)rC   rñ   r	  r*  r_   rè   rí   r   Údisplayhookr³   r!   ÚversionÚplatformÚ	COPYRIGHTZfocus_forceró   ÚtkinterZ_support_default_rootZ_default_root)r?   ZnosubÚclientr‚  r(   r(   r)   r‘     s&    
ÿ
zPyShell.beginc                 C   s   | j s
d S d| _| j ¡  d S rx  )ÚreadingÚ_stop_readline_flagrŽ   Úquitrˆ   r(   r(   r)   rð   9  s    zPyShell.stop_readlinec                 C   sˆ   | j }zd| _ | j ¡  W || _ n|| _ 0 | jr:d| _dS | j dd¡}t|ƒdkrXd}|  ¡  | jrtd| _t	stt
‚| jr„d| _d}|S )NTFrS   r•   ré   r   ro   )r„  rŽ   Úmainloopr…  rC   Úgetr€   r	  rF  r*  r  Ú	endoffile)r?   r8   r   r(   r(   r)   Úreadline?  s(    zPyShell.readlinec                 C   s   dS rx  r(   rˆ   r(   r(   r)   ÚisattyV  s    zPyShell.isattyc                 C   s¢   z| j  ddd¡rW d S W n   Y n0 | jsT| jsT|  ¡  | j d¡ |  ¡  dS d| _d| _	| jrŽ| jj
rŽ| j ¡ r„| j ¡  n
| j ¡  | jrž| j ¡  dS )Nú	sel.firstz!=úsel.lastzKeyboardInterrupt
rR   FT)rC   r¢   rï   r„  r	  r_   r!   ró   r‰  rF  r×   rì   rõ   rü   rŽ   r†  r’   r(   r(   r)   r]  Y  s&    



zPyShell.cancel_callbackc                 C   sf   | j r| jsd S | j ddd¡r0| j ddd¡s4d S | j sL|  ¡  |  ¡  nd| _d| _| j 	¡  dS )Nr•   z==rb   ré   FTrR   )
rï   r„  rC   r¢   r	  rí   rF  r‰  rŽ   r†  r’   r(   r(   r)   r^  o  s    ÿ

zPyShell.eof_callbackc                 C   s0   | j r"| j dd¡ | j d¡ n
|  |¡ dS )Nrb   ro   rR   )r„  rC   rb   ÚseeÚnewline_and_indent_eventr’   r(   r(   r)   r\  ~  s
    
zPyShell.linefeed_callbackc                 C   s:  | j r| jsd S z8| j dd¡}|rF| j ddd¡rF|  ||¡ W dS W n   Y n0 | j ddd¡rX| j d	d¡}|r°| j dd|d
 ¡r°|  | j |d |d
 ¡|¡ dS | j d	d¡}|rø| j dd|d ¡rø|  | j |d |d
 ¡|¡ dS | j dd¡}|r>| j |d dd¡r>|  | j |d
 d¡|¡ n|  | j dd¡|¡ dS | j ddd¡rx| j dd¡ | j dd¡}|r¤| 	¡ s¤| j 
dd¡ | j ddd¡rÄ|  |¡ dS | j dd¡ | jrö| j dd¡ | j d¡ n
|  |¡ | j d	dd¡ | j ¡  | jr.| j ¡  n|  ¡  dS )NrŒ  r  z<=r•   rR   rb   r    úiomark linestartrš   r   r   zinsert lineendz>=r™   rg   ré   zend-1c linestartro   )rï   r„  rC   rˆ  r¢   ÚrecallZtag_prevrangeZtag_nextrangerñ   Ústripr¦   r  rb   rŽ  rZ   Zupdate_idletasksrŽ   r†  Úrunit)r?   rf   ÚselÚprevÚnextÚindicesrÄ   r(   r(   r)   r[  ‡  sZ    
ÿ


zPyShell.enter_callbackc              	   C   sL  t  dd|¡}t  dd|¡}| d¡}| j ¡  zþ| j ddd¡ | j dd	¡ | j d
d¡}| ¡  	d¡r„|  
|¡ | j d
d¡}| j d|d  ¡ ¡ t|ƒdkrt  d|d ¡ d¡}t  d|¡ d¡}|dd … D ]8}| |¡rþ||t|ƒd …  }| j dd| ¡  ¡ qÜW | j d¡ | j ¡  n| j d¡ | j ¡  0 d S )Nz^\s*\nrS   z\n\s*$ro   r”  rj   r†   rb   ré   rg   ú:r   r   z	^([ \t]*))ÚreÚsubr3  rC   Zundo_block_startri   rñ   rˆ  ÚrstripÚendswithr  rb   r’  r€   ÚsearchÚgrouprt   rŽ  Zundo_block_stop)r?   rÄ   rf   r{   ÚprefixZorig_base_indentZnew_base_indentr   r(   r(   r)   r‘  Æ  s.    



ÿzPyShell.recallc                 C   s–   | j  dd¡}t|ƒ}|dkr8||d  dv r8|d }q|dkrX||d  dkrX|d }|dkrz||d  dv rz|d }qX|d |… }| j |¡ d S )Nr•   ré   r   r   z 	ro   )rC   rˆ  r€   r_   r1  )r?   r   rç   r(   r(   r)   r“  à  s    

zPyShell.runitc                 C   s\   | j jr| j  ¡ S z
tj W n    tjdd| jd Y d S 0 ddlm	} || j
| jƒ d S )NzNo stack tracez@There is no stack trace yet.
(sys.last_traceback is not defined)r   r   )ÚStackBrowser)r_   r×   r  r³   Úlast_tracebackr   ry   rC   Zidlelib.stackviewerr   rx   rG   )r?   rf   r   r(   r(   r)   r>  î  s    

ýzPyShell.open_stack_viewerc                 C   s   | j  d¡ | j  d¡ d S )Nr•   rê   )rC   rŽ  r’   r(   r(   r)   ra  ü  s    zPyShell.view_restart_markc                 C   s   | j jdd d S )NTrÒ   )r_   rõ   r’   r(   r(   r)   rb     s    zPyShell.restart_shellc                 C   s:   |   ¡  | j | j¡ | j dd¡ |  ¡  | j ¡  d S )Nrb   ré   )	r	  r™   r!   rZ  rC   rñ   Úset_line_and_columnrM   Z
reset_undorˆ   r(   r(   r)   ró     s
    zPyShell.showpromptc                 C   sP   | j jj}t|ddd}d | |¡¡}| d¡s:|d7 }| jj 	d|d¡ d S )NrM  T)r­   ÚtabsizeZexpand_tabsro   r  r˜   )
r_   r²   r­   r   rK   rP  rœ  ZperZbottomrb   )r?   r6  r­   ÚwrapperZwrapped_msgr(   r(   r)   Úshow_warning  s    

zPyShell.show_warningc                 C   sb   | j  dd¡}| jr | j |¡ | j  d¡dkr>| j  dd¡ | j  dd¡ |  ¡  | j ¡  d S )Nr•   ré   zend-2cro   )	rC   rˆ  ri  Ústorerb   rñ   r¢  ZctipZremove_calltip_window)r?   r&  r(   r(   r)   r	    s    zPyShell.resetoutputr(   c                 C   sX   z0| j  dd¡ t | ||d¡}| j  dd¡ W n   ‚ Y n0 | jrTd| _tsTt‚|S )Nr•   Úrightrë   F)rC   rò   r   r!   rF  r*  r  )r?   rÄ   r¥   Úcountr(   r(   r)   r!     s    zPyShell.writec                    s:   z| j  ddd¡rW dS W n ty.   Y dS 0 tƒ  ¡ S )NrŒ  r    r•   ru  )rC   r¢   r£   ÚsuperrP   rˆ   ©Ú	__class__r(   r)   rP   +  s    
zPyShell.rmenu_check_cutc                    s   | j  ddd¡rdS tƒ  ¡ S )Nrb   r    r•   ru  )rC   r¢   r©  rQ   rˆ   rª  r(   r)   rQ   3  s    zPyShell.rmenu_check_paste)N)N)N)N)N)N)N)r(   ):r‰   rŠ   r‹   r   r|  r“   r   rž   r   rU  r   rŒ   Zallow_line_numbersZidlelib.historyrK  rB   rk  r„  rï   rF  r‰  r  r…  rn  ro  r_  rp  r`  rq  rr  rw  rC  r  rí   r‡   r{  r}  r  r‘   rð   rŠ  r‹  r]  r^  r\  r[  r‘  r“  r>  ra  rb  ró   r¥  r	  r!   rP   rQ   Ú__classcell__r(   r(   rª  r)   r   I  sh   

ÿ
C

ÿ
	?




r   c              
   C   s2   | j dkr.dD ]}|  |dd|  |d¡ ¡ qd S )NZx11)ÚTextZEntryZSpinboxz	<<Paste>>z%catch {%W delete sel.first sel.last}
)Z_windowingsystemZ
bind_class)rx   Úclsr(   r(   r)   Úfix_x11_paste9  s    

ÿýr¯  a¢  
USAGE: idle  [-deins] [-t title] [file]*
       idle  [-dns] [-t title] (-c cmd | -r file) [arg]*
       idle  [-dns] [-t title] - [arg]*

  -h         print this help message and exit
  -n         run IDLE without a subprocess (DEPRECATED,
             see Help/IDLE Help for details)

The following options will override the IDLE 'settings' configuration:

  -e         open an edit window
  -i         open a shell window

The following options imply -i and will open a shell:

  -c cmd     run the command in a shell, or
  -r file    run script from file

  -d         enable the debugger
  -s         run $IDLESTARTUP or $PYTHONSTARTUP before anything else
  -t title   set title of shell window

A default edit window will be bypassed when -c, -r, or - are used.

[arg]* are passed to the command (-c) or script (-r) in sys.argv[1:].

Examples:

idle
        Open an edit window or shell depending on IDLE's configuration.

idle foo.py foobar.py
        Edit the files, also open a shell if configured to start with shell.

idle -est "Baz" foo.py
        Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell
        window with the title "Baz".

idle -c "import sys; print(sys.argv)" "foo"
        Open a shell window and run the command, passing "-c" in sys.argv[0]
        and "foo" in sys.argv[1].

idle -d -s -r foo.py "Hello World"
        Open a shell window, run a startup script, enable the debugger, and
        run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in
        sys.argv[1].

echo "import sys; print(sys.argv)" | idle - "foobar"
        Open a shell window, run the script piped in, passing '' in sys.argv[0]
        and "foobar" in sys.argv[1].
c               
      s\  dd l } ddlm} ddlm} ddlm} tdƒ dad}d}d}d }d }d}	z|   tj	dd … d¡\}
}W nF | j
y´ } z,td	|tf tjd
 t d¡ W Y d }~n
d }~0 0 |
D ]Ô\}}|dkrÒ|}d}|dkrâd}d}|dkrîd}|dkrtj t¡ t ¡  |dkrd}|dkr6tdtjd
 da|dkrj|}tj |¡rTntd|ƒ t ¡  d}|dkr|d}	d}|dkrº|t_d}qº|r²|d dkr²tj ¡ }d}tttjƒƒD ]}tj tj| ¡tj|< qÀ|r
|d dkr
dg|dd …  t_	nª|rdg| t_	n–|r2|g| t_	n‚|r’d}g }|D ]}| tj |¡¡ qD|D ],}tj |¡}|tjvrbtj d|¡ qbn"t ¡ }|tjvr´tj d|¡ tj ddddd}|pÎ|}|pÚ| }trî|sît!ƒ  t"dda#t# $¡  dd l%m&} |t#ƒ tj 'tj t(¡d!¡‰|ƒ d"krRtj 'ˆd#¡}t#j)|d$ nZ| *¡ s¬t+d%krpd&‰ d'}nd(‰ d)}‡ ‡fd*d+„|D ƒ}d,d+„ |D ƒ}t#j,dg|¢R Ž  t-t#ƒ t.t#ƒ t/t#ƒa0| 1t#t0¡ |r|s|s|d d … D ] }t0 2|¡d u rî| 3|¡ qî|st0 4¡  |rTt0 5¡ }|s6d S | *¡ rZt0j6rZ|j7 8¡  nt0j9}|rh| :¡  |	r¨tj; <d-¡p†tj; <d.¡}|r¨tj |¡r¨|j= >|¡ |s´|rü|j= ?d/tj	f ¡ |rÜ|j= @|¡ n|r4|j= A|¡ |j= >|¡ n8|r4| Bt#¡}|r| C|¡ | D¡ }|r4| C|¡ t0jErHt# F¡  q4t# G¡  tdƒ d S )0Nr   )Úsystem)Útesting)ÚmacosxTFr   zc:deihnr:st:zError: %s
%sr   rƒ   rÌ   z-dz-ez-hz-iz-nz: Warning: running IDLE without a subprocess is deprecated.z-rzNo script file: z-sz-tú-rS   rÇ   rÈ   zeditor-on-startuprÉ   )rË   ZIdle)Z	classNamer	   ZIconsZWindowszidle.ico)rÊ   g333333!@z.png)é   é    é0   é   z.gif)r´  rµ  r¶  c                    s"   g | ]}t j ˆd |ˆ f ¡‘qS )z	idle_%d%s)rI   rJ   rK   )rÃ   Úsize©ÚextZicondirr(   r)   rÅ   ã  s   ÿzmain.<locals>.<listcomp>c                 S   s   g | ]}t t|d ‘qS ))Zmasterr   )Z
PhotoImagerx   )rÃ   Úiconfiler(   r(   r)   rÅ   å  s   ÿZIDLESTARTUPZPYTHONSTARTUPzbif 1:
            import sys as _sys
            _sys.argv = %r
            del _sys
            
)HÚgetoptr€  r°  r  r±  r²  r0   r*  r³   ÚargvÚerrorr
  Ú	usage_msgr˜   Úexitr—   r!   rI   rJ   r~   r   r|  rš   r)  r„   r€   r+  r]   Údirnamerb   Úgetcwdr   rÎ   ZNoDefaultRootrV  rx   rW  Úidlelib.runr
   rK   Ú__file__Zwm_iconbitmapZisAquaTkÚ	TkVersionZwm_iconphotor   r¯  r   rG   ZsetupApprr   rh   ÚnewrH   ÚdictrŽ   Úlowerr^   rr  Úenvironrˆ  r_   r$  r  r'  r5  ZtkVersionWarningr¥  ZpreferTabsPreferenceWarningZinversedictr‡  Zdestroy)r¼  r°  r±  r²  Zenable_shellZenable_editr`   ÚcmdZscriptZstartupZoptsrO   r6  ÚoÚarç   Zpathxr&   ÚdirZ
edit_startr
   r»  ZsizesZ	iconfilesZiconsrL  ZtkversionwarningZprefer_tabs_preference_warningr(   r¹  r)   rÇ   z  s$    


ÿ



ÿ



ÿÿ
ÿü


rÇ   F)NN)Rr³   r‰   r´   r‚  ÚImportErrorr
  r  rE  r€  ZctypesZPROCESS_SYSTEM_DPI_AWAREZOleDLLZSetProcessDpiAwarenessr"   r#   r   rÅ  rV  rx   rW  rÃ  r
   ry   r0  r   r3   rI   Zos.pathr   r™  rÜ   r¿   Útextwrapr   rø   rÕ   r(  r-   Zidlelib.colorizerr   Zidlelib.configr   r  r   r   Zidlelib.editorr   r   Zidlelib.filelistr   Zidlelib.outwinr   r   r   r   r   Zidlelib.undor   rÔ   r¸   ÚeofrÀ  r†  Ú	NameErrorr    r*   r,   r0   Ú
checkcacher:   r;   r   r“   rž   Z	RPCClientr¨   r¯   r°   r   r¯  r¿  rÇ   r(   r(   r(   r)   Ú<module>   s´   ÿ
þ
 ÿ
ÿ
 ?   0   s6 6
