title: How to parse Python 2.x with Python 3.x ast module?
body: <p>I recently wrote a Sublime Text 3 plugin that parses Python code and issues some stats from it.</p>
  
  <p>Nothing too complex, except I noticed Sublime Text 3 uses Python 3.x and apparently the <a href="https://docs.python.org/3.4/library/ast.html" rel="noreferrer"><code>ast</code> module</a> expects to see Python 3.x code as well. I looked at the documentation for the <a href="https://docs.python.org/3.4/library/ast.html" rel="noreferrer"><code>ast</code> module</a> but couldn't find anything that allows me to specify the version.</p>
  
  <p>Obviously this causes issues when parsing perfectly valid Python 2.7 code.</p>
  
  <p>Is there a way to specify or somehow detect/guess the Python version ? Or to allow the parser to be more flexible ?</p>