python version of metronome