Package fabio :: Module fabioutils :: Class File
[hide private]
[frames] | no frames]

Class File

source code

object --+    
         |    
      file --+
             |
            File
Known Subclasses:

wrapper for "file" with locking

Instance Methods [hide private]
file object
__init__(name, mode=..., buffering=...)
Open a file.
source code
 
getSize(self) source code
 
setSize(self, size) source code

Inherited from file: __delattr__, __enter__, __exit__, __getattribute__, __iter__, __new__, __repr__, __setattr__, close, fileno, flush, isatty, next, read, readinto, readline, readlines, seek, tell, truncate, write, writelines, xreadlines

Inherited from object: __format__, __hash__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  size

Inherited from file: closed, encoding, errors, mode, name, newlines, softspace

Inherited from object: __class__

Method Details [hide private]

__init__(name, mode=..., buffering=...)
(Constructor)

source code 
        Open a file.  The mode can be 'r', 'w' or 'a' for reading (default),
        writing or appending.  The file will be created if it doesn't exist
        when opened for writing or appending; it will be truncated when
        opened for writing.  Add a 'b' to the mode for binary files.
        Add a '+' to the mode to allow simultaneous reading and writing.
        If the buffering argument is given, 0 means unbuffered, 1 means line
        buffered, and larger numbers specify the buffer size.  The preferred way
        to open a file is with the builtin open() function.
        Add a 'U' to mode to open the file for input with universal newline
        support.  Any line ending in the input file will be seen as a '
'
        in Python.  Also, a file so opened gains the attribute 'newlines';
        the value for this attribute is one of None (no newline read yet),
        '
', '
', '
' or a tuple containing all the newline types seen.
        
        'U' cannot be combined with 'w' or '+' mode.
        

Returns: file object
Overrides: object.__init__

Property Details [hide private]

size

Get Method:
getSize(self)
Set Method:
setSize(self, size)