title: Compile (but do not run) a Python script
body: <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>How do I compile a Python script without running it?  I just want to check the script for syntax errors.  I was hoping for a simple command line switch, but I didn't see anything in <code>python --help</code>.  I'd like an answer for both Python 2 and Python 3.</p>