Python version of mdget