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

Class BasicFile

source code

object --+
         |
        BasicFile
Known Subclasses:
OutputFile.OutputFile

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
  outputAtStart(self)
A hook for outputting stuff at the beginning of the file
  outputAtEnd(self)
A hook for outputting stuff at the end of the file
  outputAtLineEnd(self)
A hook for outputting stuff at the end of each line
  outputAtLineStart(self)
A hook for outputting stuff at the start of each line
  getHandle(self)
get the file-handle.
  writeLine(self, data)
write a data set
  close(self)
close the file

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__

outputAtStart(self)

source code 
A hook for outputting stuff at the beginning of the file

outputAtEnd(self)

source code 
A hook for outputting stuff at the end of the file

outputAtLineEnd(self)

source code 
A hook for outputting stuff at the end of each line

outputAtLineStart(self)

source code 
A hook for outputting stuff at the start of each line

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)

source code 
close the file