Re: Extracting attributes from compiled python code or parse trees

2007-07-24 Thread Peter Otten
Matteo wrote: > I am trying to get Python to extract attributes in full dotted form > from compiled expression. For instance, if I have the following: > > param = compile('a.x + a.y','','single') > > then I would like to retrieve the list consisting of ['a.x','a.y']. > I have tried using inspect

Re: Extracting attributes from compiled python code or parse trees

2007-07-23 Thread Gabriel Genellina
En Mon, 23 Jul 2007 18:13:05 -0300, Matteo <[EMAIL PROTECTED]> escribió: > I am trying to get Python to extract attributes in full dotted form > from compiled expression. For instance, if I have the following: > > param = compile('a.x + a.y','','single') > > then I would like to retrieve the list

Extracting attributes from compiled python code or parse trees

2007-07-23 Thread Matteo
Hello- I am trying to get Python to extract attributes in full dotted form from compiled expression. For instance, if I have the following: param = compile('a.x + a.y','','single') then I would like to retrieve the list consisting of ['a.x','a.y']. I have tried using inspect to look at 'co_names'