-#! /usr/bin/env python
+#! /usr/bin/env python3
+# Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
-# Copyright (C) 2005 CEA/DEN, EDF R&D
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : SyrControlComponent.py
# Author : Jean Rahuel
# Module : SuperVisionTest
-
+#
import os
import sys
import time
if iN < max :
N = iN + 1
OutLoop = 1
- print 'SyrControlComponent LOOPN InLoop iN OutLoop N',InLoop,iN,OutLoop,N
+ print('SyrControlComponent LOOPN InLoop iN OutLoop N',InLoop,iN,OutLoop,N)
self.endService( 'SyrControlComponent LOOPN' )
return OutLoop,N,0
OutLoop = 1
else :
OutLoop = 0
- print 'SyrControlComponent WHILENOTONE OutLoop N',OutLoop,N
+ print('SyrControlComponent WHILENOTONE OutLoop N',OutLoop,N)
return OutLoop
def IFNOTEVEN( self , N ) :
Odd = 0
if Even == 0 :
Odd = 1
- print 'SyrControlComponent IFNOTEVEN Odd Even N',Odd,Even,N
+ print('SyrControlComponent IFNOTEVEN Odd Even N',Odd,Even,N)
return Odd,Even
def LOOPi( self , InLoop , ii ):
if ii+1 < 2 :
i = ii + 1
OutLoop = 1
- print 'SyrControlComponent LOOPi InLoop ii OutLoop i',InLoop,ii,OutLoop,i
+ print('SyrControlComponent LOOPi InLoop ii OutLoop i',InLoop,ii,OutLoop,i)
return OutLoop,i
def WHILEEVEN( self , N ) :
OutLoop = self.Syr.C_ISEVEN( N )
- print 'SyrControlComponent WHILEEVEN OutLoop N',OutLoop,N
+ print('SyrControlComponent WHILEEVEN OutLoop N',OutLoop,N)
return OutLoop
def __init__(self, orb, poa, this, containerName, instanceName, interfaceName):
SALOME_ComponentPy_i.__init__(self, orb, poa, this, containerName,
- instanceName, interfaceName, 1)
+ instanceName, interfaceName, True)
self.Syr = lcc.FindOrLoadComponent( 'FactoryServer' , 'SyrComponent' )
- print "SyrControlComponent::__init__",dir(self.Syr)
+ print("SyrControlComponent::__init__",dir(self.Syr))
+
+ def getVersion( self ):
+ import salome_version
+ return salome_version.getVersion("COMPONENT", True)