Salome HOME
Merge Python 3 porting.
[modules/yacs.git] / src / yacsloader / samples / pyremote3.xml
1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <!--
3   Copyright (C) 2006-2016  CEA/DEN, EDF R&D
4
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18
19   See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
21 -->
22 <proc name="newSchema_1">
23    <type name="string" kind="string"/>
24    <struct name="Engines/dataref">
25       <member name="ref" type="string"/>
26    </struct>
27    <type name="bool" kind="bool"/>
28    <sequence name="boolvec" content="bool"/>
29    <type name="double" kind="double"/>
30    <sequence name="dblevec" content="double"/>
31    <objref name="file" id="file"/>
32    <type name="int" kind="int"/>
33    <sequence name="intvec" content="int"/>
34    <objref name="pyobj" id="python:obj:1.0"/>
35    <sequence name="seqint" content="int"/>
36    <sequence name="stringvec" content="string"/>
37    <container name="DefaultContainer">
38       <property name="container_name" value="FactoryServer"/>
39       <property name="name" value="localhost"/>
40    </container>
41    <container name="container0">
42    </container>
43    <foreach name="ForEachLoop_int1" nbranch="2" type="int">
44       <remote name="PyFunction3">
45          <function name="f">
46             <code><![CDATA[import time
47
48 def f(i5):
49     print(my_container)
50     print("nouvelle branche avec ", i5)
51     for n in range(15):
52       print(time.time())
53       time.sleep(1)
54     
55 ]]></code>
56          </function>
57          <load container="container0"/>
58          <inport name="i5" type="int"/>
59       </remote>
60    </foreach>
61    <inline name="PyScript2">
62       <script><code><![CDATA[o4 = [1, 2]
63 ]]></code></script>
64       <outport name="o4" type="seqint"/>
65    </inline>
66    <control> <fromnode>PyScript2</fromnode> <tonode>ForEachLoop_int1</tonode> </control>
67    <datalink control="false">
68       <fromnode>ForEachLoop_int1</fromnode> <fromport>evalSamples</fromport>
69       <tonode>ForEachLoop_int1.PyFunction3</tonode> <toport>i5</toport>
70    </datalink>
71    <datalink control="false">
72       <fromnode>PyScript2</fromnode> <fromport>o4</fromport>
73       <tonode>ForEachLoop_int1</tonode> <toport>SmplsCollection</toport>
74    </datalink>
75    <parameter>
76       <tonode>ForEachLoop_int1</tonode><toport>nbBranches</toport>
77       <value><int>2</int></value>
78    </parameter>
79    <presentation name="ForEachLoop_int1" x="260.5" y="144.5" width="200.5" height="183" expanded="1" expx="260.5" expy="144.5" expWidth="200.5" expHeight="183" shownState="0"/>
80    <presentation name="ForEachLoop_int1.PyFunction3" x="38.5" y="116" width="158" height="63" expanded="1" expx="38.5" expy="116" expWidth="158" expHeight="63" shownState="0"/>
81    <presentation name="PyScript2" x="41" y="71" width="158" height="63" expanded="1" expx="41" expy="71" expWidth="158" expHeight="63" shownState="0"/>
82    <presentation name="__ROOT__" x="0" y="0" width="465" height="331.5" expanded="1" expx="0" expy="0" expWidth="465" expHeight="331.5" shownState="0"/>
83 </proc>