Package PyFoam :: Package Basics :: Module BasicFile :: Class BasicFile
[hide private]
[frames] | no frames]

Class BasicFile

source code

object --+
         |
        BasicFile

File for data output

The format of the file is: one data-set per line Values are separated by tabs

The file is created the first time it is written

Instance Methods [hide private]
 
__init__(self, name)
name - name of the file
source code
 
outputAtStart(self)
A hook for outputting stuff at the beginning of the file
source code
 
outputAtEnd(self)
A hook for outputting stuff at the end of the file
source code
 
outputAtLineEnd(self)
A hook for outputting stuff at the end of each line
source code
 
outputAtLineStart(self)
A hook for outputting stuff at the start of each line
source code
 
callAtOpen(self)
A hook that gets called when the file is opened
source code
 
callAtClose(self)
A hook that gets called when the file is closed
source code
 
getHandle(self)
get the file-handle.
source code
 
writeLine(self, data)
write a data set
source code
 
close(self, temporary=False)
close the file
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

source code 

name - name of the file

Overrides: object.__init__

getHandle(self)

source code 

get the file-handle. File is created and opened if it wasn't opened before

writeLine(self, data)

source code 

write a data set

data - a tuple with the data-set

close(self, temporary=False)

source code 

close the file

Parameters:
  • temporary - only close the file temporary (to be appended on later)