Salome HOME
A way to deal with environment modules.
[tools/yacsgen.git] / Examples / types1 / components.py
index d8484d306de0dae60c9c134acc9146bd9bb9deb2..f9c59af7798267dbf002d73c7b60787d54ea2d2d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2016  EDF R&D
+# Copyright (C) 2009-2021  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
@@ -149,7 +149,7 @@ c1=CPPComponent("compo1",services=[
 pydefs="""import SALOME_TYPES"""
 
 pybody="""
-print a,b,c,d,d2,d3,e,f,g
+print (a,b,c,d,d2,d3,e,f,g)
 aa=SALOME_TYPES.Parameter(name="a",value="45.")
 ab=[]
 ac=[1,2,3]
@@ -159,11 +159,11 @@ ad3=[[[[1,2,3]]]]
 ae=["aaa","bbb"]
 af=SALOME_TYPES.ParametricInput(inputVarList=ae,outputVarList=ae, inputValues=[[[[1,2,3]]]],specificParameters=[])
 ag=SALOME_TYPES.ParametricOutput(outputValues=[[[[1,2,3]]]], specificOutputInfos=[], returnCode=1, errorMessage="error")
-print aa,ab,ac,ad,ad2,ad3,ae,af,ag
+print (aa,ab,ac,ad,ad2,ad3,ae,af,ag)
 """
 
 s2pybody="""
-print "service s2 python component"
+print ("service s2 python component")
 aa=a
 a.Register()
 """
@@ -201,5 +201,9 @@ g.generate()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR, "GEOM":GEOM_ROOT_DIR})
+g.make_appli("appli", restrict=["KERNEL"],
+             altmodules={"GUI":GUI_ROOT_DIR,
+                         "YACS":YACS_ROOT_DIR,
+                         "GEOM":GEOM_ROOT_DIR},
+             sys_modules=SYS_MODULES)