Speed up python mode