HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib64/python3.7/site-packages/guppy/gsl/__pycache__/Filer.cpython-37.opt-1.pyc
B

�]V�@s2dZGdd�d�ZGdd�d�ZGdd�d�ZdS)zD Handles filing of data from low-level gsl filing and data records.
c@s8eZdZdd�Zdd�ZeZdd�Zdd�Zd	d
�ZdS)�FilercCs ||_g|_i|_|�|�dS)N)�mod�writefile_envs�writefile_namesZaccept)�selfr�node�r�B/opt/alt/python37/lib64/python3.7/site-packages/guppy/gsl/Filer.py�__init__szFiler.__init__cCs|�|�dS)N)�children_accept)rrrrr�
visit_file
szFiler.visit_filecCs<|j}||jkrtd|��||j|<|j�t||��dS)NzDuplicate file name: %r)�argr�SyntaxErrorr�append�	WriteFile)rr�namerrr�visit_write_files


zFiler.visit_write_filecCs.g}x|jD]}|�d|j�qWd�|�S)Nzwrite file: %s�
)rr�	file_name�join)rZinfos�errr�get_infoszFiler.get_infocCsx|jD]}|��qWdS)N)r�write)rrrrrrszFiler.writeN)	�__name__�
__module__�__qualname__r	rZvisit_stringrrrrrrrrsrc@sDeZdZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dS)rNcCsj||_|j|_}||_|j|_|�|�|jdkr:d}n|jj}||_|jdkrXd}n|jj}||_	dS)N�)
�filerrZ	node_filerrr
�	node_data�data�	node_mode�mode)rrrrrr rrrr	(s


zWriteFile.__init__cCs|�d|�dS)Nr)�
set_single)rrrrr�
visit_text:szWriteFile.visit_textcCs|�d|�dS)NZnode_end)r!)rrrrr�	visit_end=szWriteFile.visit_endcCs|�d|�dS)Nr)r!)rrrrr�
visit_mode@szWriteFile.visit_modecCs>t||d�dk	r"td||jf��t|||�|�|d�dS)NzDuplicate %r at index %rZno_node_expected)�getattrr
�index�setattrr
)rrrrrrr!CszWriteFile.set_singlecCsV|jj}|jjrB|j|jj}|�|j|j|jB�rB|�|j|�|�|j|j	�dS)N)
r�IO�
backup_suffixr�access�R_OK�W_OK�renameZ
write_filer)rr(Zbackup_namerrrrIszWriteFile.write)rrrrrr	r"r#r$r!rrrrrr$src@s,eZdZdZdZdZdZdd�Zdd�Zd	S)
�_GLUECLAMP_)z_parent.FileIO:IO)r)z
,gsl-backupedz
.tag writefile

cCs
t||�S)N)r)rrrrrrgsz_GLUECLAMP_.filerc

Cs�|j}|jj}|��}|j�|d�}d}zxd||f}|�|�}|�|�}|��|�	|�}	d}
d}d||
|d|f}|�|�}|�|�}|��|�	|�}	Wdx&|�
|�D]}|�|j�||��q�W|�|�XdS)N�xZhelloz!
.write file: %s
..text
%s
..end
zhello2
z
hello3z;
.write file: %s
..text
%s
.write file: %s
..text
%s
..end
z.3)
r(Z_parentZ	SpecNodesZmkdtemp�pathrZnode_of_stringrrZ	read_file�listdir�remove�rmdir)
rr(�NZtempdirZtempnamer�Xr�f�dZdata2Zdata3rrrr�_test_main_js,


	


z_GLUECLAMP_._test_main_N)	rrrZ	_imports_Z	_setable_r)Z
syntax_gslrr8rrrrr.Ssr.N)�__doc__rrr.rrrr�<module>s/