b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/posixfile.pyo
Size7.54 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:30
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sfdZddkZeided�dd d��YZddd�Zd �Zd
Zd ZdZ dS(
s:Extended file operations available in POSIX.

f = posixfile.open(filename, [mode, [bufsize]])
will create a new posixfile object

f = posixfile.fileopen(fileobject)
will create a posixfile object from a builtin file object

f.file()
will return the original builtin file object

f.dup()
will return a new file object based on a new filedescriptor

f.dup2(fd)
will return a new file object based on the given filedescriptor

f.flags(mode)
will turn on the associated flag (merge)
mode can contain the following characters:

(character representing a flag)
a append only flag
c close on exec flag
n no delay flag
s synchronization flag
(modifiers)
! turn flags 'off' instead of default 'on'
= copy flags 'as is' instead of default 'merge'
? return a string in which the characters represent the flags
that are set

note: - the '!' and '=' modifiers are mutually exclusive.
- the '?' modifier will return the status of the flags after they
have been changed by other characters in the mode string

f.lock(mode [, len [, start [, whence]]])
will (un)lock a region
mode can contain the following characters:

(character representing type of lock)
u unlock
r read lock
w write lock
(modifiers)
| wait until the lock can be granted
? return the first lock conflicting with the requested lock
or 'None' if there is no conflict. The lock returned is in the
format (mode, len, start, whence, pid) where mode is a
character representing the type of lock ('r' or 'w')

note: - the '?' modifier prevents a region from being locked; it is
query only
iÿÿÿÿNsIThe posixfile module is deprecated; fcntl.lockf() provides better lockingit _posixfile_cBsheZdZddgZd�Zddd�Zd�Zd�Zd �Zd
�Z d �Z
d �Z RS(
s;File wrapper class that provides extra POSIX file routines.topentclosedcCs=|i}d|i|i|i|itt|��dfS(Ns$<%s posixfile '%s', mode '%s' at %s>i(t_file_tstatesRtnametmodethextid(tselftfile((s!/usr/lib64/python2.6/posixfile.pyt__repr__Cs triÿÿÿÿcCs(ddk}|i|i|||��S(Niÿÿÿÿ(t __builtin__tfileopenR(R RRtbufsizeR
((s!/usr/lib64/python2.6/posixfile.pyRLs cCs ddk}tt|��djo
td�n||_x^t|�D]P}|id�p:t||�}t||i �ot
|||�q�qHqHW|S(Niÿÿÿÿs
<type 'file'>s,posixfile.fileopen() arg must be file objectt_( ttypestreprttypet TypeErrorRtdirt
startswithtgetattrt
isinstancetBuiltinMethodTypetsetattr(R R
Rt maybemethodtattr((s!/usr/lib64/python2.6/posixfile.pyRPs 
 
cCs|iS(N(R(R ((s!/usr/lib64/python2.6/posixfile.pyR
`scCsQddk}t|d�p
td�n|i|i|ii��|ii�S(Niÿÿÿÿtfdopensdup() method unavailable(tposixthasattrtAttributeErrorRtdupRtfilenoR(R R((s!/usr/lib64/python2.6/posixfile.pyR!cs 
cCsXddk}t|d�p
td�n|i|ii�|�|i||ii�S(NiÿÿÿÿRsdup() method unavailable(RRR tdup2RR"RR(R tfdR((s!/usr/lib64/python2.6/posixfile.pyR#ks
 
cGs)ddk}ddk}|o.t|�djo
td�n|d}nd}d}d|jo||iB}nd|jo||iB}nd|jo||iB}n|i}d |joH|i|i�|i d�}d
|jo||@}q||B}n|i|i�|i
|�}d |jo.d
|j}|i|i�|i |�}nd|jo®d }|i|i�|i d�}|i|@o|d}n|i|i�|i d�d@o|d }n|i|@o|d}n|i|@o|d}n|SdS(
NiÿÿÿÿisToo many argumentsit?tntatst=t!tct(
tfcntltostlenRtO_NDELAYtO_APPENDtO_SYNCRR"tF_GETFLtF_SETFLtF_SETFDtF_GETFD(R twhichR-R.tl_flagsR
tcur_fltarg((s!/usr/lib64/python2.6/posixfile.pytflagstsF



 


 "
#cGs;ddk}ddk}d|jo
|i}n>d|jo
|i}n$d|jo
|i}n
td�d|jo
|i}n$d|jo
|i}n
|i}d}d}d} t |�d jo|d} njt |�d
jo|\} }nGt |�d jo|\} }}n!t |�d jo
td �nddk
}
ddk } |
i djo(|i
d|| | i�||�} nZ|
i d jo(|i
d|||| ddd�} n"|i
d|||| dd�} |i|ii�|| �} d|jo|
i d!jo%|id| �\}} }
}}n�|
i d"jo+|id| �\}}}} }}
}n]|
i djo(|id| �\}}}} }
}n%|id| �\}}}} }}
||ijo;||ijod| |||
fSd| |||
fSq7ndS(#NiÿÿÿÿtwR tusno type of lock specifiedt|R%iiiistoo many argumentstnetbsd1topenbsd2tfreebsd2tfreebsd3tfreebsd4tfreebsd5tfreebsd6tfreebsd7tfreebsd8tbsdos2tbsdos3tbsdos4t
lxxxxlxxxxlhhtaix3taix4thhllliithhllhhtlinux2( R?R@RARBRCRDRERFRGRHRIRJ(RLRM( R?R@RARBRCRDRHRIRJ(RLRM(tstructR-tF_WRLCKtF_RDLCKtF_UNLCKRtF_SETLKWtF_GETLKtF_SETLKR/tsysR.tplatformtpacktgetpidRR"tunpack(R thowtargsRQR-tl_typetcmdtl_whencetl_starttl_lenRXR.tflocktl_pidtl_sysidtl_vfs((s!/usr/lib64/python2.6/posixfile.pytlock�sj





 



 

   

%+($( t__name__t
__module__t__doc__RR RRR
R!R#R;Rh(((s!/usr/lib64/python2.6/posixfile.pyR;s      %R cCst�i|||�S(s4Public routine to open a file as a posixfile object.(RR(RRR((s!/usr/lib64/python2.6/posixfile.pyRÜscCst�i|�S(sCPublic routine to get a posixfile object from a Python file object.(RR(R
((s!/usr/lib64/python2.6/posixfile.pyRàsii((
RktwarningstwarntDeprecationWarningRRRtSEEK_SETtSEEK_CURtSEEK_END(((s!/usr/lib64/python2.6/posixfile.pyt<module>6s  
¡