updated python mode