python version of serial mf