擅长:python、mysql、java
<p>使用<a href="https://docs.python.org/2/library/functions.html#execfile" rel="noreferrer">execfile('script.py')</a>但它只在python 2.x上工作,如果您使用的是3.0,请尝试<a href="https://stackoverflow.com/questions/436198/what-is-an-alternative-to-execfile-in-python-3-0">this</a></p>