Salome HOME
Merge branch 'V9_2_2_BR'
[tools/yacsgen.git] / module_generator / pyth_tmpl.py
index c6e69413f2499902a8005ff6ae0e7e44f4a47946..dc82e86e9a40261833558948be196f2a16a98359 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015  EDF R&D
+# Copyright (C) 2009-2019  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,7 @@
 try:
   from string import Template
 except:
-  from compat import Template,set
+  from module_generator.compat import Template,set
 
 pyCompo="""
 import sys,traceback,os
@@ -30,7 +30,7 @@ import calcium
 import dsccalcium
 import SALOME
 import Engines
-import cPickle
+import pickle
 
 try:
   import numpy
@@ -70,10 +70,10 @@ pyCompoEXE="""#!/usr/bin/env python
 
 if __name__ == '__main__':
   from omniORB import CORBA
-  print sys.argv
+  print( sys.argv)
   orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
   poa = orb.resolve_initial_references("RootPOA")
-  print "ORB and POA initialized",orb,poa
+  print( "ORB and POA initialized",orb,poa)
   sys.stdout.flush()
   sys.stderr.flush()
 
@@ -84,7 +84,7 @@ if __name__ == '__main__':
   compo=${component}(orb,poa,container,containerName, instanceName, "${component}")
   comp_o = compo._this()
   comp_iors = orb.object_to_string(comp_o)
-  print "ior ${component}",comp_iors
+  print( "ior ${component}",comp_iors)
 
   sys.stdout.flush()
   sys.stderr.flush()
@@ -94,7 +94,7 @@ if __name__ == '__main__':
   poaManager.activate()
 
   orb.run()
-  print "fin du composant ${component} standalone"
+  print( "fin du composant ${component} standalone")
 
 """