관리-도구
편집 파일: __init__.cpython-36.opt-1.pyc
3 <z�W�% � @ s� d dl T d dlT d dlT d dlT d dlT d dlT dZyd dlT dZW n e k r\ dZY nX ddl Z efdd�Zefd d �Z efdd�Zefd d�Zefdd�Zefdd�Zdd� Zdd� Zdedddddfdd�Zdeddddddddddfdd�Zdefdd�Zdeddddddddddddfdd�Zdefdd �Zd6d!d"�Zd7d#d$�Zdeefd%d&�Zdeefd'd(�Zefd)d*�Zefd+d,�Zefd-d.�Z efd/d0�Z!G d1d2� d2e"�Z#G d3d4� d4e#d5�Z$dS )8� )�*z3.12TF� Nc c s4 || �}zx|j � r |j� V qW W d|j� X dS )z9 Scan a YAML stream and produce scanning tokens. N)Zcheck_tokenZ get_token�dispose)�stream�Loader�loader� r � /usr/lib64/python3.6/__init__.py�scan s r c c s4 || �}zx|j � r |j� V qW W d|j� X dS )z9 Parse a YAML stream and produce parsing events. N)Zcheck_eventZ get_eventr )r r r r r r �parse s r c C s || �}z|j � S |j� X dS )zj Parse the first YAML document in a stream and produce the corresponding representation tree. N)Zget_single_noder )r r r r r r �compose* s r c c s4 || �}zx|j � r |j� V qW W d|j� X dS )zb Parse all YAML documents in a stream and produce corresponding representation trees. N)Z check_nodeZget_noder )r r r r r r �compose_all5 s r c C s || �}z|j � S |j� X dS )zd Parse the first YAML document in a stream and produce the corresponding Python object. N)Zget_single_datar )r r r r r r �loadA s r c c s4 || �}zx|j � r |j� V qW W d|j� X dS )z\ Parse all YAML documents in a stream and produce corresponding Python objects. N)Z check_data�get_datar )r r r r r r �load_allL s r c C s t | t�S )z� Parse the first YAML document in a stream and produce the corresponding Python object. Resolve only basic YAML tags. )r � SafeLoader)r r r r � safe_loadX s r c C s t | t�S )z~ Parse all YAML documents in a stream and produce corresponding Python objects. Resolve only basic YAML tags. )r r )r r r r � safe_load_all` s r c C sd d}|dkrt j� }|j}|||||||d�} zx| D ]} | j| � q6W W d| j� X |r`|� S dS )zl Emit YAML parsing events into a stream. If stream is None, return the produced string instead. N)� canonical�indent�width� allow_unicode� line_break)�io�StringIO�getvalue�emitr )�eventsr �Dumperr r r r r r �dumperZeventr r r r h s r c C s� d} |dkr,|dkrt j� }nt j� }|j} ||||||||||| | d�}z,|j� x| D ]}|j|� qZW |j� W d|j� X | r�| � S dS )z� Serialize a sequence of representation trees into a YAML stream. If stream is None, return the produced string instead. N) r r r r r �encoding�version�tags�explicit_start�explicit_end)r r �BytesIOr �open� serialize�closer )�nodesr r r r r r r r r# r$ r! r"