<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Yf*                 @   sr   d  d l  Td  d l m Z d  d l Z d  d l j Z d  d l m Z Gd d   d e  Z	 Gd d   d  Z
 d S)	    )*)EditorWindowN)	IOBindingc               @   s   e  Z d  Z d Z d d   Z d d   Z d d   Z d d	   Z f  d
 d d  Z d d   Z	 d d   Z
 d& d' d( d) d* g Z d d d d  d! g Z d Z d d" d#  Z d$ d%   Z d S)+OutputWindowzAn editor window that can serve as an output file.

    Also the future base class for the Python shell window.
    This class has no input facilities.
    c             G   s*   t  j |  |  |  j j d |  j  d  S)Nz<<goto-file-line>>)r   __init__textZbindgoto_file_line)selfargs r   9/opt/alt/python35/lib64/python3.5/idlelib/OutputWindow.pyr      s    zOutputWindow.__init__c             C   s   d S)Nr   r   )r	   filenamer   r   r   ispythonsource   s    zOutputWindow.ispythonsourcec             C   s   d S)NZOutputr   )r	   r   r   r   short_title   s    zOutputWindow.short_titlec             C   s   |  j    r d Sd Sd  S)Nyesno)Z	get_saved)r	   r   r   r   	maybesave   s    zOutputWindow.maybesaveinsertc             C   sg   t  | t t f  r* | j t j d  } |  j j | | |  |  j j |  |  j j   t	 |  S)Nreplace)

isinstancebytesdecoder   encodingr   r   Zseeupdatelen)r	   stagsmarkr   r   r   write%   s    zOutputWindow.writec             C   s"   x | D] } |  j  |  q Wd  S)N)r   )r	   linesliner   r   r   
writelines-   s    zOutputWindow.writelinesc             C   s   d  S)Nr   )r	   r   r   r   flush1   s    zOutputWindow.flushCut<<cut>>rmenu_check_cutCopy<<copy>>rmenu_check_copyPaste	<<paste>>rmenu_check_pasteNGo to file/line<<goto-file-line>>zfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):c       	      C   s   |  j  d  k rN g  } x- |  j D]" } | j t j | t j   q W| |  _  |  j j d d  } |  j |  } | s |  j j d d  } |  j |  } | s t	 j
 d d d |  j d  S| \ } } |  j j |  } | j |  d  S)Nzinsert linestartzinsert lineendzinsert -1line linestartzinsert -1line lineendzNo special linezTThe line you point at doesn't look like a valid file name followed by a line number.parent)file_line_progsfile_line_patsappendrecompile
IGNORECASEr   get_file_line_helpertkMessageBoxZ	showerrorflistopenZgotoline)	r	   ZeventlZpatr    resultr   linenoZeditr   r   r   r   I   s(     		
zOutputWindow.goto_file_linec             C   s   xx |  j  D]i } | j |  } | r
 | j d d  \ } } y t | d  } | j   PWq
 t k
 rr w
 Yq
 Xq
 Wd  Sy | t |  f SWn t k
 r d  SYn Xd  S)N      r)r/   searchgroupr9   closeOSErrorint	TypeError)r	   r    progmatchr   r<   fr   r   r   r6   d   s    
zOutputWindow._file_line_helper)r#   r$   r%   )r&   r'   r(   )r)   r*   r+   )NNN)r,   r-   N)__name__
__module____qualname____doc__r   r   r   r   r   r!   r"   Zrmenu_specsr0   r/   r   r6   r   r   r   r   r      s*   			r   c               @   sR   e  Z d  Z d d d i d d d i i Z d d   Z d d	   Z d
 d   Z d S)OnDemandOutputWindowstdoutZ
foregroundZbluestderrz#007700c             C   s   | |  _  d  |  _ d  S)N)r8   owin)r	   r8   r   r   r   r      s    	zOnDemandOutputWindow.__init__c             C   s-   |  j  s |  j   |  j  j | | |  d  S)N)rP   setupr   )r	   r   r   r   r   r   r   r      s    	
zOnDemandOutputWindow.writec             C   su   t  |  j  |  _ } | j } x3 |  j j   D]" \ } } | r/ | j | |  q/ W| j d  |  j j |  _ d  S)NZsel)	r   r8   rP   r   tagdefsitemsZtag_configureZ	tag_raiser   )r	   rP   r   tagZcnfr   r   r   rQ      s    	zOnDemandOutputWindow.setupN)rI   rJ   rK   rR   r   r   rQ   r   r   r   r   rM   x   s
   rM   )ZtkinterZidlelib.EditorWindowr   r2   Ztkinter.messageboxZ
messageboxr7   Zidlelibr   r   rM   r   r   r   r   <module>   s   
q