Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51064

Re: How to read a make file in python and access its elements

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'elements.': 0.07; 'subject:file': 0.07; 'tool,': 0.07; 'parsing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:How': 0.10; 'python': 0.11; 'cmake': 0.16; 'make,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:access': 0.16; 'subject:make': 0.16; 'subject:python': 0.16; 'elements': 0.16; 'wrote:': 0.18; 'file,': 0.19; 'load': 0.23; 'header:User-Agent:1': 0.23; 'looks': 0.24; 'question': 0.24; 'first,': 0.26; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'tried': 0.27; 'ideal': 0.29; 'unix': 0.29; 'program,': 0.31; 'file': 0.32; "we're": 0.32; 'text': 0.33; 'actual': 0.34; 'message.': 0.35; 'tool': 0.35; 'but': 0.35; 'url:org': 0.36; 'list': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'anything': 0.39; 'san': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'simple,': 0.60; "you're": 0.61; 'refer': 0.63; 'places': 0.64; 'talking': 0.65; 'subject:read': 0.84; 'usage.': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re: How to read a make file in python and access its elements
Date Mon, 22 Jul 2013 20:39:33 -0400
References <beec5587-f154-47ed-b5f9-d548428d4da5@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 174.32.174.34
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7
In-Reply-To <beec5587-f154-47ed-b5f9-d548428d4da5@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4991.1374539989.3114.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1374539989 news.xs4all.nl 15886 [2001:888:2000:d::a6]:51327
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51064

Show key headers only | View raw


On 07/22/2013 03:09 PM, san wrote:
> How to read/load  the cmake file in python and access its elements.
> I have a scenario, where i need to load the make file and access its elements.
> I have tried reading the make file as text file and parsing it,but its not the ideal solution
> Please let me know how to load the .mk file and access its elements in python.
>

First, just what do you mean by "make file"?  You refer to cmake, make, 
and .mk in three places in your message.  How about a link to the actual 
tool you're interested in? And a brief list of the other tools you're 
using it with.

Is this it?
http://www.cmake.org/

Once we're talking about the same tool, then the question is what 
"elements" are you interested in?  If your cmake is anything like the 
traditional make program, the format is deceptively simple, and 
enormously complex in usage.

But I suspect that your cmake has very little to do with Unix make 
tools.  The cmake that I gave the link for uses a CMakeLists file, which 
looks nothing like a makefile.


-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to read a make file in python and access its elements san <santosh.ssit@gmail.com> - 2013-07-22 12:09 -0700
  Re: How to read a make file in python and access its elements Ben Finney <ben+python@benfinney.id.au> - 2013-07-23 09:14 +1000
  Re: How to read a make file in python and access its elements Dave Angel <davea@davea.name> - 2013-07-22 20:39 -0400
  Re: How to read a make file in python and access its elements alex23 <wuwei23@gmail.com> - 2013-07-23 10:48 +1000

csiph-web