Sindbad~EG File Manager
�
&Μg�T � �N � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
ZddlZddl
Z
ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd lmZ ddlZddlZ eej2 d
d� s4dD ] Z eee� ej2 d
ez = � dej2 d
_ dZ dZee_ ee _ d4d�Z" d5d�Z#da$d� Z% e%d� ejL � Z'e'fd�Z(da)da*da+d6d�Z,d� Z-d� Z.d� Z/d� Z0d� Z1d� Z2d� Zd� Z3d� Z4d Z5d!� Z6d"� Z7 G d#� d$ejp � Z9 G d%� d&ejt � Z; G d'� d(e;� Z< G d)� d*e;� Z= G d+� d,ej| � Z? G d-� d.� Z@eAd/k( rdd0lBm,Z, e,d1d2�3� e%d� y# e!$ r Y ��w xY w)7z� 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)�simpledialog�
messagebox�font�dialog�
filedialog�commondialog�ttkztkinter.Fz 127.0.0.1zCtrl-D (end-of-file)c � � d}|d|� d|� d�z
}|�t j ||� }|j � }|r|d|z z
}||j � d| � d�z
}|S )zFormat warnings the IDLE way.z!
Warning (from warnings module):
z File "z", line �
z %s
�: )� linecache�getline�strip�__name__)�message�category�filename�lineno�line�ss �(/usr/local/lib/python3.12/idlelib/run.py�idle_formatwarningr 3 sy � � .�A��9�X�J�i��x�r� 2�2�A��|�� � ��6�2���:�:�<�D�� �Z�$�
����H����b�� �� ,�,�A��H� c � � |�t j } |j t | ||||� � y# t $ r Y yw xY w)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 s r �idle_showwarning_subprocr( @ sH � � �|��z�z��
��
�
�%���8�V�T�;� <���
��
�s �3 � ?�?c � � | r't � t j a t t _ yyt �t t _ da yy)zFReplace warning.showwarning with idle_showwarning_subproc, or reverse.N)�_warnings_showwarning�warnings�showwarningr( )�captures r �capture_warningsr. P sA � � � �(�$,�$8�$8�!�#;�H� � )� !�,�#8�H� �$(�!� -r! Tc �&