On 29 November 2011 09:51, Andrea Crotti <andrea.crott...@gmail.com> wrote:

> from sys import version_info
>
> if version_info[1] == 5:
>    from psi.devsonly.ast import parse, NodeVisitor
> else:
>    from ast import parse, NodeVisitor

Why don't you just:

try:
    from ast import parse, NodeVisitor
except ImportError:
    from psi.devsonly.ast import parse, NodeVisitor

-- 
Arnaud
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to