Hi Claudiu,

I did notice that it worked correctly when I changed the print statement to
a print function.

Thanks for the quick response!
Mike




On Wed, Apr 2, 2014 at 12:56 PM, Claudiu Popa <pcmantic...@gmail.com> wrote:

> Unfortunately, it's not possible to properly analyze code with Python
> 3, using Python 2 syntax. This is due to the underlying Python parser.
> If you try to compile that code, you'll get a SyntaxError, as seen
> below and there is nothing we can do here.
>
> D:\Projects\snippets>py -3
> Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600
> 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from ast import parse
> >>> parse(open("c.py").read())
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "C:\Python34\lib\ast.py", line 35, in parse
>     return compile(source, filename, mode, PyCF_ONLY_AST)
>   File "<unknown>", line 16
>     print "You're using Windows!"
>                                 ^
> SyntaxError: invalid syntax
>



-- 
-----------------
Mike Driscoll

Blog:   http://blog.pythonlibrary.org
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to