관리-도구
편집 파일: outwin.cpython-36.opt-1.pyc
3 � f� � @ s� d Z ddlZddlmZ ddlmZ ddlmZ dddd d gZda dd� Z d d� ZG dd� de�ZG dd� d�Z edkr�ddlmZ edddd� dS )z0Editor window that can serve as an output file. � N)� messagebox)�EditorWindow)�iomenuzfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):c C s dd� t D �adS )z?Compile the patterns for matching to file name and line number.c S s g | ]}t j|t j��qS � )�re�compile� IGNORECASE)�.0Zpatr r �3/opt/alt/python36/lib64/python3.6/idlelib/outwin.py� <listcomp> s z!compile_progs.<locals>.<listcomp>N)�file_line_pats�file_line_progsr r r r � compile_progs s r c C s� t s t� x^t D ]R}|j| �}|r|jdd�\}}yt|d�}|j� P W q tk r` wY qX qW dS y|t|�fS tk r� dS X dS )a- Extract file name and line number from line of text. Check if line of text contains one of the file/line patterns. If it does and if the file and line are valid, return a tuple of the file name and line number. If it doesn't match or if the file or line is invalid, return None. � � �rN) r r �search�group�open�close�OSError�int� TypeError)�line�prog�match�filename�lineno�fr r r �file_line_helper s"