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

Class Utilities

Known Subclasses:
FileBasis, LAMMachine, SolutionDirectory

Class with utility methods

Can be inherited without side effects by classes that need these methods
Method Summary
  __init__(self)
  execute(self, cmd, debug)
Execute the command cmd
  listDirectory(self, d)
Lists the files in a directory, but excludes certain names and files with certain endings
  writeDictionaryHeader(self, f)
Writes a dummy header so OpenFOAM accepts the file as a dictionary

Class Variable Summary
list excludeNames = ['^.svn$', '~$']

Method Details

execute(self, cmd, debug=False)

Execute the command cmd

Currently no error-handling is done
Returns:
A list with all the output-lines of the execution

listDirectory(self, d)

Lists the files in a directory, but excludes certain names and files with certain endings
Parameters:
d - The directory to list
Returns:
List of the found files and directories

writeDictionaryHeader(self, f)

Writes a dummy header so OpenFOAM accepts the file as a dictionary
Parameters:
f - The file to write to
           (type=file)

Class Variable Details

excludeNames

Type:
list
Value:
['^.svn$', '~$']                                                       

Generated by Epydoc 2.1 on Mon Jan 22 23:52:48 2007 http://epydoc.sf.net