Idea for pure-python templates using AST.
Paul Wray
paulwray111111 at gmail.com
Tue Aug 16 21:10:00 EDT 2011
> You code fail, see below for other comment
>
> Traceback (most recent call last):
> File "Download/pastie-2379978.rb", line 108, in <module>
> make_template(template1)
> File "Download/pastie-2379978.rb", line 60, in make_template
> ast.fix_missing_locations(astFromSrc)
> File "/usr/lib/python2.6/ast.py", line 133, in fix_missing_locations
> _fix(node, 1, 0)
> File "/usr/lib/python2.6/ast.py", line 132, in _fix
> _fix(child, lineno, col_offset)
> File "/usr/lib/python2.6/ast.py", line 132, in _fix
> _fix(child, lineno, col_offset)
> File "/usr/lib/python2.6/ast.py", line 121, in _fix
> if 'lineno' in node._attributes:
> AttributeError: 'arguments' object has no attribute '_attributes'
>
Sorry, should have specified Python 2.7.
Also Pastie thinks its ruby code so the donwloaded file is confusingly
___.rb
More information about the Python-list
mailing list