HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/bin/__pycache__/jp.cpython-310.pyc
o

we��@s\ddlZddlZddlZddlmZddlZddlmZdd�Zedkr,e�	e��dSdS)�N)�pformat)�
exceptionsc
Cs�t��}|�d�|jdddd�|jdddd	�|��}|j}|jr:t�|j�}tj	�
t|j��tj	�
d
�dS|j
rYt|j
d��
}t�|�}Wd�n1sSwYn
tj��}t�|�}ztj	�
tjt�||�d
dd��tj	�
d
�WdStjy�}ztj�
d|�WYd}~dSd}~wtjy�}ztj�
d|�WYd}~dSd}~wtjy�}ztj�
d|�WYd}~dSd}~wtjy�}ztj�
d|�WYd}~dSd}~ww)N�
expressionz-fz
--filenamezaThe filename containing the input data.  If a filename is not given then data is read from stdin.)�helpz--ast�
store_truez-Pretty print the AST, do not search the data.)�actionr�
r�r�F)�indent�ensure_asciizinvalid-arity: %s
�zinvalid-type: %s
zunknown-function: %s
zsyntax-error: %s
)�argparse�ArgumentParser�add_argument�
parse_argsr�ast�jmespath�compile�sys�stdout�writer�parsed�filename�open�json�load�stdin�read�loads�dumps�searchr�
ArityError�stderr�JMESPathTypeError�UnknownFunctionError�
ParseError)�parser�argsr�f�data�e�r,�H/home/arjun/projects/env/lib/python3.10/site-packages/../../../bin/jp.py�mainsX
����


������r.�__main__)
rrr�pprintrrrr.�__name__�exitr,r,r,r-�<module>s)�