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

Source Code for Module PyFoam.Applications.EchoPickledApplicationData

 1  #  ICE Revision: $Id$ 
 2  """ 
 3  Application class that implements pyFoamEchoPickledApplicationData 
 4  """ 
 5   
 6  import sys,re 
 7   
 8  from .PyFoamApplication import PyFoamApplication 
 9   
10  from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile 
11   
12  from .CommonPickledDataInput import CommonPickledDataInput 
13   
14  from PyFoam.Error import PyFoamException 
15   
16 -class EchoPickledApplicationData(PyFoamApplication, 17 CommonPickledDataInput):
18 - def __init__(self,args=None,inputApp=None):
19 description="""\ Reads a file with pickled application data 20 and if asked for prints it. Mainly used for testing the exchange of 21 data via pickled data 22 """ 23 24 PyFoamApplication.__init__(self, 25 args=args, 26 description=description, 27 usage="%prog [options]", 28 nr=0, 29 changeVersion=False, 30 interspersed=True, 31 inputApp=inputApp)
32
33 - def addOptions(self):
35
36 - def run(self):
37 self.setData(self.readPickledData())
38 39 # Should work with Python3 and Python2 40