PyFoam.FoamInformation module
Getting Information about the Foam-Installation (like the installation directory)
- class PyFoam.FoamInformation.VersionTuple(iterable=(), /)[source]
Bases:
tupleWrapper around the regular tuple that is printed in a way that can be parsed as a tuple in a OF-dictionary
- __dict__ = mappingproxy({'__module__': 'PyFoam.FoamInformation', '__doc__': 'Wrapper around the regular tuple that is printed in a way that\n can be parsed as a tuple in a OF-dictionary\n\n ', '__str__': <function VersionTuple.__str__>, '__dict__': <attribute '__dict__' of 'VersionTuple' objects>, '__annotations__': {}})
- __module__ = 'PyFoam.FoamInformation'
- PyFoam.FoamInformation.changeFoamVersion(new, force64=False, force32=False, compileOption=None, foamCompiler=None, wmCompiler=None)[source]
Changes the used FoamVersion. Only valid during the runtime of the interpreter (the script or the Python session) :param new: The new Version :param force64: Forces the 64-bit-version to be chosen :param force32: Forces the 32-bit-version to be chosen :param compileOption: Forces Debug or Opt :param wmCompiler: Force new value for WM_COMPILER :param foamCompiler: Force system or OpenFOAM-Compiler
- PyFoam.FoamInformation.ensureDynamicLibraries()[source]
Ensure that the dynamic library path is set for systems where it was erased for security rasons (for instance Mac OS X 10.11)
- PyFoam.FoamInformation.foamInstalledVersions()[source]
- Returns:
A list with the installed versions of OpenFOAM
- PyFoam.FoamInformation.foamPostProcessing()[source]
- Returns:
the caseDicts/postProcessing-directory of the distro
- PyFoam.FoamInformation.foamVersion(useConfigurationIfNoInstallation=False)[source]
- Returns:
tuple that represents the Foam-version as found
in $WM_PROJECT_VERSION
- PyFoam.FoamInformation.foamVersionNumber(useConfigurationIfNoInstallation=False)[source]
- Returns:
tuple that represents the Foam-Version-Number (without
strings
- PyFoam.FoamInformation.foamVersionString(useConfigurationIfNoInstallation=False)[source]
- Returns:
string for the Foam-version as found
in $WM_PROJECT_VERSION
- PyFoam.FoamInformation.getPathFromEnviron(name)[source]
Gets a path from an environment variable :return: the path :rtype: string :param name: the name of the environment variable
- PyFoam.FoamInformation.getUserTempDir()[source]
Return path to a user-specific private directory. Create directory if not existing
- PyFoam.FoamInformation.injectVariables(script, forceArchOption=None, compileOption=None, foamCompiler=None, wmCompiler=None)[source]
Executes a script in a subshell and changes the current environment with the enivironment after the execution :param script: the script that is executed :param forceArchOption: To which architecture Option should be forced :param compileOption: to which value the WM_COMPILE_OPTION should be forced :param wmCompiler: Force new value for WM_COMPILER :param foamCompiler: Force system or OpenFOAM-Compiler
- PyFoam.FoamInformation.oldAppConvention()[source]
Returns true if the version of OpenFOAM is older than 1.5 and it therefor uses the ‘old’ convention to call utilities (“dot, case”)