PyFoam.Basics.BasicFile module

Basic file output

class PyFoam.Basics.BasicFile.BasicFile(name)[source]

Bases: object

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

callAtClose()[source]

A hook that gets called when the file is closed

callAtOpen()[source]

A hook that gets called when the file is opened

close(temporary=False)[source]

close the file :param temporary: only close the file temporary (to be appended on later)

getHandle()[source]

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

outputAtEnd()[source]

A hook for outputting stuff at the end of the file

outputAtLineEnd()[source]

A hook for outputting stuff at the end of each line

outputAtLineStart()[source]

A hook for outputting stuff at the start of each line

outputAtStart()[source]

A hook for outputting stuff at the beginning of the file

writeLine(data)[source]

write a data set

data - a tuple with the data-set