View file File name : ygen.cpython-36.pyc Content :3 r��W� � @ s: d dl Zd dlZdd� Zdd� Zdd� Zedkr6e� dS ) � Nc C sh t | �}d| }d| }x |D ]\}}|j� j|�rP qW x |D ]\}}|j� j|�r@P q@W |d |fS )Nz #--! %s-startz#--! %s-end� )� enumerate�strip� startswith�endswith)�lines�tagZsrclinesZ start_tagZend_tagZstart_index�lineZ end_index� r �/usr/lib/python3.6/ygen.py�get_source_range s r c C sF g }d}d| }x0| D ](}|j � j|�r0| }q|r|j|� qW |S )NTz#--! %s)r r �append)r r Zfiltered_lines�includeZtag_textr r r r �filter_section s r c C s� t jjt�} tjt jj| d�t jj| d�� tt jj| d�d��}|j� }W d Q R X t |d�\}}t |d�\}}t |d�\}}|||� } t | d�} t | d�}||||�<