Package PyFoam :: Package Applications :: Module Execute
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.Applications.Execute

 1  #  ICE Revision: $Id: /local/openfoam/Python/PyFoam/PyFoam/Applications/Execute.py 3501 2008-08-03T18:40:52.402178Z bgschaid  $  
 2  """ 
 3  Application class that implements pyFoamExecute 
 4  """ 
 5   
 6  from PyFoamApplication import PyFoamApplication 
 7   
 8  from subprocess import call 
 9   
10 -class Execute(PyFoamApplication):
11 - def __init__(self,args=None):
12 description=""" 13 Runs a command, but first switches the environment to a specific 14 OpenFOAM-version. Is of use for using wmake for a specific version 15 """ 16 17 PyFoamApplication.__init__(self, 18 nr=1, 19 exactNr=False, 20 args=args, 21 usage="%prog [options] <command> [arguments]", 22 description=description)
23
24 - def addOptions(self):
25 pass
26
27 - def run(self):
28 result=call(self.parser.getArgs()) 29 if result!=0: 30 print "\nError result:",result
31