%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyc

�
;�Pc@s�dZddd��YZdd
d��YZddd��YZdsQedkr�d	d
lmZe�jjZejj	�ejj
�ndS(sD Handles filing of data from low-level gsl filing and data records.
tFilercBs;eZd�Zd�ZeZd�Zd�Zd�ZRS(cCs,||_g|_i|_|j|�dS(N(tmodtwritefile_envstwritefile_namestaccept(tselfRtnode((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyt__init__s			cCs|j|�dS(N(tchildren_accept(RR((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyt
visit_file
scCsR|j}||jkr(td|�n||j|<|jjt||��dS(NsDuplicate file name: %r(targRtSyntaxErrorRtappendt	WriteFile(RRtname((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pytvisit_write_files
	
cCs;g}x%|jD]}|jd|j�qWdj|�S(Nswrite file: %ss
(RRt	file_nametjoin(Rtinfoste((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pytget_infoscCs"x|jD]}|j�q
WdS(N(Rtwrite(RR((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyRs(t__name__t
__module__RR	tvisit_stringRRR(((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyRs				R
cBsJeZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
RS(cCs�||_|j|_}||_|j|_|j|�|jdkrSd}n|jj}||_|j	dkr�d}n|j	j}||_
dS(Nt(tfilerRt	node_fileR
RRt	node_datatNonetdatat	node_modetmode(RRRRRR ((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyR&s		
			cCs|jd|�dS(NR(t
set_single(RR((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyt
visit_text8scCs|jd|�dS(Ntnode_end(R!(RR((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyt	visit_end;scCs|jd|�dS(NR(R!(RR((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyt
visit_mode>scCsUt||d�dk	r1td||jf�nt|||�|j|d�dS(NsDuplicate %r at index %rtno_node_expected(tgetattrRRtindextsetattrR(RRR((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyR!AscCs}|jj}|jjrc|j|jj}|j|j|j|jB�rc|j|j|�qcn|j|j|j	�dS(N(
RtIOt
backup_suffixRtaccesstR_OKtW_OKtrenamet
write_fileR(RR*tbackup_name((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyRGsN(RRRRRRR"R$R%R!R(((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyR
#s					t_GLUECLAMP_cBs2eZdZdZdZdZd�Zd�ZRS(s_parent.FileIO:IOR+s
,gsl-backupeds
.tag writefile

cCs
t||�S(N(R(RR((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyResc
Cs�|j}|jj}|j�}|jj|d�}d}z)d||f}|j|�}|j|�}|j�d|ks�t	�|j
�|j|�}	|	|ks�t	�d}
d}d||
|d|f}|j|�}|j|�}|j
�|j||j�|ks$t	�|j|�}	|	|
ksEt	�|j|d�|ksdt	�Wdx3|j
|�D]"}|j|jj||��qxW|j|�XdS(	Ntxthellos!
.write file: %s
..text
%s
..end
swrite file: %sshello2
s
hello3s4
.write file: %s
%s
.write file: %s
..text
%s
..end
s.3(R*t_parentt	SpecNodestmkdtemptpathRtnode_of_stringRRtAssertionErrorRt	read_fileR+tlistdirtremovetrmdir(
RR*tNttempdirttempnameRtXRtftdtdata2tdata3R((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyt_test_main_hs4	

"# (s_parent.FileIO:IO(R+(RRt	_imports_t	_setable_R+t
syntax_gslRRG(((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyR2Qs	it__main__i����(tRootN((((t__doc__RR
R2RtguppyRLtgsltFileIOt
set_test_modeRG(((sB/opt/alt/python27/lib64/python2.7/site-packages/guppy/gsl/Filer.pyt<module>s.H


Zerion Mini Shell 1.0