Sindbad~EG File Manager

Current Path : /lib64/python3.6/site-packages/lxml/html/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/lxml/html/__pycache__/_diffcommand.cpython-36.pyc

3

�'�YW�@s�ddlmZddlZddlZddlZddlZddlmZdZej	ded�Z
e
jdd	d
ddd
d�e
jdddddd�ddd�Zdd�Z
ejdejejB�ZejdejejB�Zdd�Zdd�ZdS) �)�absolute_importN�)�htmldiff�zR%prog [OPTIONS] FILE1 FILE2
%prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...)Zusage�descriptionz-oz--output�FILE�output�-zFile to write the difference to)�metavar�dest�default�helpz-az--annotation�
store_true�
annotationzDo an annotation)�actionrr
cCs�|dkrtjdd�}tj|�\}}|jr4t||�St|�dkrZtd�tj�tj	d�|\}}t
|�}t
|�}t|�d}t|�\}}}	t||�}
||
|	}
|j
dkr�|
jd�s�|
d7}
tjj|
�nt|j
d�}|j|
�|j�dS)Nr�zError: you must give two filesr	�
�wb)�sys�argv�parser�
parse_argsr�annotate�len�printZ
print_help�exit�	read_file�
split_bodyrr�endswith�stdout�write�open�close)�args�optionsZfile1Zfile2Zinput1Zinput2Zbody1�preZbody2�post�result�f�r)�$/usr/lib64/python3.6/_diffcommand.py�main s.





r+cCsL|dkrtjj�}n4tjj|�s.td|��nt|d�}|j�}|j�|S)Nr	zInput file %s does not exist�rb)	r�stdin�read�os�path�exists�OSErrorr!r")�filename�cr(r)r)r*r:s
rz	<body.*?>z
</body.*?>cCsnd}}tj|�}|r6|d|j��}||j�d�}tj|�}|rd||j�d�}|d|j��}|||fS)Nr)�
body_start_re�search�end�body_end_re�start)Zhtmlr%r&�matchr)r)r*rKs

rcCstd�tjd�dS)NzNot yet implementedr)rrr)r$r#r)r)r*rWsr)N)Z
__future__rZoptparser�rer/ZdiffrrZOptionParserrZ
add_optionr+r�compile�I�Sr5r8rrr)r)r)r*�<module>s8


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists