using Python to realize mplsh