You can set the sphere to be the parent of the text:
Code:
import viz
import vizshape
import vizact
viz.go()
sphere = vizshape.addSphere(radius=0.2)
text = viz.addText('Sphere',parent=sphere)
text.setPosition([-0.3,0.3,0])
text.setScale([0.2]*3)
text.visible(viz.OFF)
vizact.onkeydown('t',text.visible,viz.TOGGLE)
import vizcam
cam = vizcam.PivotNavigate(distance=3)
cam.centerNode(text)