def __init__(self, orb, poa, contID, containerName, instanceName,
interfaceName):
- if verbose(): print "Begin of PYCALCULATOR::__init__"
+ if verbose(): print("Begin of PYCALCULATOR::__init__")
SALOME_ComponentPy.SALOME_ComponentPy_i.__init__(
self,
interfaceName, # component interface name
False) # notification flag (for notification server)
- self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i(self._orb)
+ self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i(self._orb)
- if verbose(): print "End of PYCALCULATOR::__init__"
+ if verbose(): print("End of PYCALCULATOR::__init__")
pass
self.beginService("PYCALCULATOR::Clone")
if verbose():
- print "Begin of PYCALCULATOR::Clone"
- print " field : ", field
+ print("Begin of PYCALCULATOR::Clone")
+ print(" field : ", field)
pass
frescorba = None
# create CORBA field
frescorba = MEDCouplingFieldDoubleServant._this(f)
- except Exception, e:
- if verbose(): print e
+ except Exception as e:
+ if verbose(): print(e)
pass
if verbose():
- print "End of PYCALCULATOR::Clone"
+ print("End of PYCALCULATOR::Clone")
pass
self.endService("PYCALCULATOR::Clone")
self.beginService("PYCALCULATOR::Add")
if verbose():
- print "Begin of PYCALCULATOR::Add"
- print " field 1 : ", field1
- print " field 2 : ", field2
+ print("Begin of PYCALCULATOR::Add")
+ print(" field 1 : ", field1)
+ print(" field 2 : ", field2)
pass
frescorba = None
# create CORBA field
frescorba = MEDCouplingFieldDoubleServant._this(fres)
- except Exception, e:
- if verbose(): print e
+ except Exception as e:
+ if verbose(): print(e)
pass
if verbose():
- print "End of PYCALCULATOR::Add"
+ print("End of PYCALCULATOR::Add")
pass
self.endService("PYCALCULATOR::Add")
self.beginService("PYCALCULATOR::Mul")
if verbose():
- print "Begin of PYCALCULATOR::Mul"
- print " field 1 : ", field1
- print " field 2 : ", field2
+ print("Begin of PYCALCULATOR::Mul")
+ print(" field 1 : ", field1)
+ print(" field 2 : ", field2)
pass
frescorba = None
# create CORBA field
frescorba = MEDCouplingFieldDoubleServant._this(fres)
- except Exception, e:
- if verbose(): print e
+ except Exception as e:
+ if verbose(): print(e)
pass
if verbose():
- print "End of PYCALCULATOR::Mul"
+ print("End of PYCALCULATOR::Mul")
pass
self.endService("PYCALCULATOR::Mul")
self.beginService("PYCALCULATOR::AddConstant")
if verbose():
- print "Begin of PYCALCULATOR::AddConstant"
- print " field : ", field
- print " constant : ", val
+ print("Begin of PYCALCULATOR::AddConstant")
+ print(" field : ", field)
+ print(" constant : ", val)
pass
frescorba = None
# create CORBA field
frescorba = MEDCouplingFieldDoubleServant._this(fres)
- except Exception, e:
- if verbose(): print e
+ except Exception as e:
+ if verbose(): print(e)
pass
if verbose():
- print "End of PYCALCULATOR::AddConstant"
+ print("End of PYCALCULATOR::AddConstant")
pass
self.endService("PYCALCULATOR::AddConstant")
self.beginService("PYCALCULATOR::MulConstant")
if verbose():
- print "Begin of PYCALCULATOR::MulConstant"
- print " field : ", field
- print " constant : ", val
+ print("Begin of PYCALCULATOR::MulConstant")
+ print(" field : ", field)
+ print(" constant : ", val)
pass
frescorba = None
# create CORBA field
frescorba = MEDCouplingFieldDoubleServant._this(fres)
- except Exception, e:
- if verbose(): print e
+ except Exception as e:
+ if verbose(): print(e)
pass
if verbose():
- print "End of PYCALCULATOR::MulConstant"
+ print("End of PYCALCULATOR::MulConstant")
pass
self.endService("PYCALCULATOR::MulConstant")
medFile = os.path.join(os.getenv("DATA_DIR"), "MedFiles", "pointe.med")
meshName = "maa1"
fieldName = "fieldcelldoublevector"
-print medFile, meshName, fieldName
+print(medFile, meshName, fieldName)
f = ReadFieldCell(medFile, meshName, 0, fieldName, -1, -1)
forig = MEDCouplingFieldDoubleServant._this(f)
clt_f3 = MEDCouplingFieldDoubleClient.New(f3)
clt_f4 = MEDCouplingFieldDoubleClient.New(f4)
-print "clt_forig:", clt_forig
-print "clt_fcopy:", clt_fcopy
-print "clt_f1:", clt_f1
-print "clt_f2:", clt_f2
-print "clt_f3:", clt_f3
-print "clt_f4:", clt_f4
+print("clt_forig:", clt_forig)
+print("clt_fcopy:", clt_fcopy)
+print("clt_f1:", clt_f1)
+print("clt_f2:", clt_f2)
+print("clt_f3:", clt_f3)
+print("clt_f4:", clt_f4)