I believe you’ve got instead NameError: global name ‘voronoi’ is not defined, right?
Should be instead: from voronoi_class import voronoi
Keyword global
should go inside a function instead:
def setup():
# ...
global v
v = voronoi(100, w, h)
println(v.r)
It’s customary for class names to be “CamelCase” instead: class Voronoi: