Salome HOME
Copyright update 2022
[modules/geom.git] / src / GEOM_SWIG / GEOM_ObjectInfo.py
index f34e86601d16b0f6f4757f5e131b7b2d964a1a7e..4d323da767843357512625e928c1b64b5b3d0948 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-#  GEOM GEOM_SWIG : binding of C++ omplementaion with Python
+#  GEOM GEOM_SWIG : binding of C++ implementation with Python
 #  File   : GEOM_ObjectInfo.py
 #  Author : Michael ZORIN
 #  Module : GEOM
@@ -27,7 +27,7 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 # Create several objects
 obj1 = geompy.MakeVertex(0.,0.,0.)
@@ -47,12 +47,12 @@ obj5_entry = geompy.addToStudy(obj5, "Object5")
 
 # Get information about objects
 hasInfo = geompy.hasObjectInfo()
-print "Check if GEOM module provides information about its objects: ", hasInfo
+print("Check if GEOM module provides information about its objects: ", hasInfo)
 if hasInfo == True:
-    print "Information about first  object: ", geompy.getObjectInfo(salome.myStudyId, obj1_entry)
-    print "Information about second object: ", geompy.getObjectInfo(salome.myStudyId, obj2_entry)
-    print "Information about third  object: ", geompy.getObjectInfo(salome.myStudyId, obj3_entry)
-    print "Information about fourth object: ", geompy.getObjectInfo(salome.myStudyId, obj4_entry)
-    print "Information about fifth  object: ", geompy.getObjectInfo(salome.myStudyId, obj5_entry)
+    print("Information about first  object: ", geompy.getObjectInfo(obj1_entry))
+    print("Information about second object: ", geompy.getObjectInfo(obj2_entry))
+    print("Information about third  object: ", geompy.getObjectInfo(obj3_entry))
+    print("Information about fourth object: ", geompy.getObjectInfo(obj4_entry))
+    print("Information about fifth  object: ", geompy.getObjectInfo(obj5_entry))
 
-salome.sg.updateObjBrowser(1)
+salome.sg.updateObjBrowser()