Reading point coordinates froma file

This is an old script but no longer works

import geompy
f = open(“points.xyz”)
n = 0
for l in f:
x, y, z = [ float(v) for v in l.split() ]
pt = geompy.MakeVertex(x, y, z)
geompy.addToStudy(pt, “Pt_%s”%(n))
n += 1
pass
import salome
salome.sg.updateObjBrowser(0)

error
ModuleNotFoundError: No module named ‘geompy’

Any suggestions?

I was able to work it out from the manuals

import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New()
f = open(“helical.csv”)
n = 0
for l in f:
x, y, z = [ float(v) for v in l.split() ]
pt = geompy.MakeVertex(x, y, z)
geompy.addToStudy(pt, “Pt_%s”%(n))
n += 1
pass
salome.sg.updateObjBrowser()