1
2 """
3 Application class that implements pyFoamExecute
4 """
5
6 from PyFoamApplication import PyFoamApplication
7
8 from PyFoam.FoamInformation import changeFoamVersion
9
10 from subprocess import call
11
14 description="""
15 Runs a command, but first switches the environment to a specific
16 OpenFOAM-version. Is of use for using wmake for a specific version
17 """
18
19 PyFoamApplication.__init__(self,
20 nr=1,
21 args=args,
22 usage="%prog [options] <command> [arguments]",
23 description=description)
24
26 self.parser.add_option("--foamVersion",
27 dest="foamVersion",
28 default=None,
29 help="Change the OpenFOAM-version that is to be used")
30
40