<blockquote>
<p><strong>Possible Duplicate:</strong><br/>
<a href="https://stackoverflow.com/questions/4284313/how-can-i-check-the-syntax-of-python-script-without-executing-it">How can I check the syntax of Python script without executing it?</a> </p>
</blockquote>
<p>如何在不运行Python脚本的情况下编译它?我只想检查脚本的语法错误。我希望有一个简单的命令行切换,但是在<code>python --help</code>中没有看到任何内容。我想要Python 2和Python 3的答案。</p>