On 12/21/2011 08:03 PM, Andrea Crotti wrote:
> I just had the following (maybe stupid) idea.
>
> One of the great things about python is that it exposes the parsing
> completely
> in the standard library, with the module tokenize.
>
> Now would not it be possible to write a simple tokenizer that ta
On Wed, Dec 21, 2011 at 15:03, Andrea Crotti wrote:
> I just had the following (maybe stupid) idea.
Not at all... it sounds like you want to look at the ast module.
Matthew Desmarais gave a talk on doing things like this (mostly for
code analysis) at PyCon, called "What Would You Do With An AST?
I just had the following (maybe stupid) idea.
One of the great things about python is that it exposes the parsing
completely
in the standard library, with the module tokenize.
Now would not it be possible to write a simple tokenizer that takes a python
file and returns a nice structured format of