Salome HOME
Merge Python 3 porting.
[modules/yacs.git] / src / yacsloader / samples / pyremote2.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="stringvec" content="string"/>
36    <container name="DefaultContainer">
37       <property name="container_name" value="FactoryServer"/>
38       <property name="name" value="localhost"/>
39    </container>
40    <container name="container0">
41    </container>
42    <container name="container1">
43    </container>
44    <remote name="PyFunction3">
45       <function name="f">
46          <code><![CDATA[import time
47
48 def f():
49     print(my_container)
50     for n in range(15):
51       print(time.time())
52       time.sleep(1)
53     
54 ]]></code>
55       </function>
56       <load container="container0"/>
57    </remote>
58    <remote name="PyFunction4">
59       <function name="f">
60          <code><![CDATA[import time
61 def f():
62     print(my_container)
63     for n in range(15):
64       print(time.time())
65       time.sleep(1)
66 ]]></code>
67       </function>
68       <load container="container1"/>
69    </remote>
70    <presentation name="PyFunction3" x="6" y="34" width="158" height="36" expanded="1" expx="6" expy="34" expWidth="158" expHeight="36" shownState="0"/>
71    <presentation name="PyFunction4" x="6" y="72" width="158" height="36" expanded="1" expx="6" expy="72" expWidth="158" expHeight="36" shownState="0"/>
72    <presentation name="__ROOT__" x="0" y="0" width="168" height="112" expanded="1" expx="0" expy="0" expWidth="168" expHeight="112" shownState="0"/>
73 </proc>