Package PyFoam :: Module FoamInformation
[hide private]
[frames] | no frames]

Module FoamInformation

source code

Getting Information about the Foam-Installation (like the installation directory)

Functions [hide private]
string
getPathFromEnviron(name)
Gets a path from an environment variable
source code
 
foamTutorials()
Returns: directory in which the tutorials reside
source code
 
foamMPI()
@return the used MPI-Implementation
source code
 
foamVersion()
Returns: tuple that represents the Foam-version as found in $WM_PROJECT_VERSION
source code
 
foamVersionNumber()
Returns: tuple that represents the Foam-Version-Number (without strings
source code
 
foamInstalledVersions()
Returns: A list with the installed versions of OpenFOAM
source code
 
changeFoamVersion(new)
Changes the used FoamVersion.
source code
 
injectVariables(script)
Executes a script in a subshell and changes the current environment with the enivironment after the execution
source code

Imports: environ, path, listdir, popen4, re, error, warning, config


Function Details [hide private]

getPathFromEnviron(name)

source code 

Gets a path from an environment variable

Parameters:
  • name - the name of the environment variable
Returns: string
the path

foamTutorials()

source code 
Returns:
directory in which the tutorials reside

foamVersion()

source code 
Returns:
tuple that represents the Foam-version as found in $WM_PROJECT_VERSION

foamVersionNumber()

source code 
Returns:
tuple that represents the Foam-Version-Number (without strings

foamInstalledVersions()

source code 
Returns:
A list with the installed versions of OpenFOAM

changeFoamVersion(new)

source code 

Changes the used FoamVersion. Only valid during the runtime of the interpreter (the script or the Python session)

Parameters:
  • new - The new Version

injectVariables(script)

source code 

Executes a script in a subshell and changes the current environment with the enivironment after the execution

Parameters:
  • script - the script that is executed