python version of replay