1
2 """
3 Application class that implements pyFoamExecute
4 """
5
6 from PyFoam.Applications.PyFoamApplication import PyFoamApplication
7 from PyFoam.ThirdParty.six import print_
8
9 from subprocess import call
10
13 description="""\
14 Runs a command, but first switches the environment to a specific
15 OpenFOAM-version. Is of use for using wmake for a specific version
16 """
17
18 PyFoamApplication.__init__(self,
19 nr=1,
20 exactNr=False,
21 args=args,
22 usage="%prog [options] <command> [arguments]",
23 description=description)
24
27
29 result=call(self.parser.getArgs())
30 if result!=0:
31 print_("\nError result:",result)
32
33
34