I just directly translated to Python from this MATLAB script, which I've also included here. The original is public domain, so my translation is, too.
Also see Frequency estimation methods in Python for interpolating to get sharp intersample peaks
sixtenbe has posted a more powerful version here
and there's a PyPI repo
@v3nz3n sorry, I'm not good at listing imports because I just did
from pylab import *
, but I'm trying to be better now. Spyder has pyflakes built in, which helps.