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

Class Utilities

source code

object --+
         |
        Utilities

Class with utility methods

Can be inherited without side effects by classes that need these methods

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
execute(self, cmd, debug=False)
Execute the command cmd
source code
 
writeDictionaryHeader(self, f)
Writes a dummy header so OpenFOAM accepts the file as a dictionary
source code
 
listDirectory(self, d)
Lists the files in a directory, but excludes certain names and files with certain endings
source code

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

Class Variables [hide private]
  excludeNames = ["^.svn$", "~$"]
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

execute(self, cmd, debug=False)

source code 

Execute the command cmd

Currently no error-handling is done

Returns:
A list with all the output-lines of the execution

writeDictionaryHeader(self, f)

source code 

Writes a dummy header so OpenFOAM accepts the file as a dictionary

Parameters:
  • f (file) - The file to write to

listDirectory(self, d)

source code 

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