Current Path : /compat/linux/proc/68247/root/usr/local/lib/python2.5/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/68247/root/usr/local/lib/python2.5/posixfile.pyc |
³ò h”Rc @ sG d Z d d d „ ƒ YZ d d d „ Z d „ Z d Z d Z d Z d S( 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 t _posixfile_c B sh e Z d Z d d g Z d „ Z d d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s; File wrapper class that provides extra POSIX file routines.t opent closedc C s= | i } d | i | i | i | i t t | ƒ ƒ d f S( Ns$ <%s posixfile '%s', mode '%s' at %s>i ( t _file_t statesR t namet modet hext id( t selft file( ( s% /usr/local/lib/python2.5/posixfile.pyt __repr__A s t riÿÿÿÿc C s( d d k } | i | i | | | ƒ ƒ S( Niÿÿÿÿ( t __builtin__t fileopenR ( R R R t bufsizeR ( ( s% /usr/local/lib/python2.5/posixfile.pyR J s c C s d d k } t t | ƒ ƒ d j o t d ‚ n | | _ x^ t | ƒ D]P } | i d ƒ p: t | | ƒ } t | | i ƒ o t | | | ƒ q˜ qH qH W| S( Niÿÿÿÿs <type 'file'>s, posixfile.fileopen() arg must be file objectt _( t typest reprt typet TypeErrorR t dirt startswitht getattrt isinstancet BuiltinMethodTypet setattr( R R R t maybemethodt attr( ( s% /usr/local/lib/python2.5/posixfile.pyR N s c C s | i S( N( R ( R ( ( s% /usr/local/lib/python2.5/posixfile.pyR ^ s c C sQ d d k } t | d ƒ p t d ‚ n | i | i | i i ƒ ƒ | i i ƒ S( Niÿÿÿÿt fdopens dup() method unavailable( t posixt hasattrt AttributeErrorR t dupR t filenoR ( R R ( ( s% /usr/local/lib/python2.5/posixfile.pyR! a s c C sX d d k } t | d ƒ p t d ‚ n | i | i i ƒ | ƒ | i | | i i ƒ S( NiÿÿÿÿR s dup() method unavailable( R R R t dup2R R"