import yourscript # is in yourscript.py yourclass = yourscript.Yourclass() yourclass.run() 或者类似这样的东西?