san <santosh.s...@gmail.com> writes:

> I have a scenario, where i need to load the make file and access its
> elements.  

What do you mean by “elements” of a make file? Is that a term with a
specific meaning, or do you mean some particular parts of the make file?

> I have tried reading the make file as text file and parsing it,but its
> not the ideal solution 

You might be interested in using a library purpose-built for creating a
parser <URL:http://pyparsing.wikispaces.com/>.

I'm not aware of any makefile-syntax-aware tool for Python. Your best
option could be to write your own parser using the above library.

-- 
 \         “True greatness is measured by how much freedom you give to |
  `\      others, not by how much you can coerce others to do what you |
_o__)                                               want.” —Larry Wall |
Ben Finney

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

Reply via email to