B
    d                 @   sl   d dl mZ d dlZd dlZd dlZddlmZ ddlmZ dddZ	d	d
 Z
edkrhe
ejdd  dS )    )print_functionN   )	roundtrip)dumpFc             C   s   t j| rBt|  tdt|   |r2t|  nt|  t  nRt j| rxDt | D ]"}|	drZt
t j| || qZW ntd|  tjd d S )N=z.pyz/WARNING: skipping '%s', not a file or directory)file)ospathisfileprintlenr   r   isdirlistdirendswithroundtrip_recursivejoinsysstderr)target	dump_treeitem r   E/var/www/html/venv/lib/python3.7/site-packages/astunparse/__main__.pyr   	   s    

r   c             C   sX   t jdd}|jdddd |jdtdd	 || }x|jD ]}t||jd
 q>W d S )NZ
astunparse)progr   +z4Files or directories to show roundtripped source for)nargshelpz--dumpz/Show a pretty-printed AST instead of the source)typer   )r   )argparseArgumentParseradd_argumentbool
parse_argsr   r   r   )argsparser	argumentsr   r   r   r   main   s    
r&   __main__)F)
__future__r   r   r   r   Zunparserr    r   r   r&   __name__argvr   r   r   r   <module>   s   
