'pyface Timer has no `start()`

I am trying to animate some plots in mayavi and am already running into errors when I run the simple example animations from the documentation:

import numpy as np
from mayavi import mlab
x, y = np.mgrid[0:3:1,0:3:1]
s = mlab.surf(x, y, np.asarray(x*0.1, 'd'))

@mlab.animate
def anim():
    for i in range(10):
        s.mlab_source.scalars = np.asarray(x*0.1*(i+1), 'd')
        yield

anim()
mlab.show()

It seems this error can be traced to the pyface package, where even this code gives the same error:

import pyface.timer.timer
pyface.timer.timer.Timer(100, lambda: 3)

Both sets of code return the error AttributeError: 'Timer' object has no attribute 'start'.

Is the documentation faulty? Am I doing something wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source