from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy)
you also need to modify some lines where smeshBuilder is used instead of smesh
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy)
you also need to modify some lines where smeshBuilder is used instead of smesh