Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.084 X-Spam-Evidence: '*H*': 0.83; '*S*': 0.00; 'library,': 0.05; 'am,': 0.12; 'parser,': 0.16; 'subject:which': 0.16; 'url:voidspace': 0.16; '\xe9crit': 0.16; 'wrote:': 0.18; 'header:In-Reply-To:1': 0.22; 'cheers': 0.23; "i'm": 0.28; 'behaves': 0.30; 'comments.': 0.30; 'config': 0.30; 'url:library': 0.31; 'message- id:@gmail.com': 0.31; 'minor': 0.32; 'does': 0.32; 'implement': 0.32; 'there': 0.33; 'received:209.85.212': 0.33; 'header:User- Agent:1': 0.33; 'steven': 0.34; 'hi,': 0.34; 'to:addr:python- list': 0.35; 'something': 0.35; 'url:python': 0.35; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'received:192': 0.38; 'should': 0.38; 'url:org': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.40; 'url:uk': 0.40; 'subject: ': 0.74; 'difference.': 0.84; 'received:192.168.0.1': 0.84; 'received:209.85.212.178': 0.91; 'subject:there': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=gkCsrE8GwymF05GJLxIcasK5xOHZiv+IsdvijGdEEaM=; b=tnNDsnbS3frhJjWHJdySUdClFGxKig3uYP92+3fIkULRGq64B4KJIy3BlLBUAuQYBZ X7vorqBDjkV9fcjV11dHA/SpzdeT7HonJhosHSU6evT2DWx2Z8Wu+GwkZMWyOs2l02AB b676lyzxvTeRuIIge/hjFWHPvXNgec8B13mzTcgOS519qKfRaOfmod3rB8METuX4Xk7N 0R9kujH/vsEOoTDR2SgHj2NYw8fmlQzx9YJ7dd4hg5RS5MiKqrpTmN/lCQC10JuX3Zja 3NScAywwQC3qCUwr2QvDL/Ez/XyoTRRUnVq7gKkwVaHrzWFD7fGDezktnIdpFBAKYyh0 GIig== Date: Thu, 15 Mar 2012 22:49:57 +0100 From: Karim User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Is there a ConfigParser which keeps comments References: <4F615880.6080005@syslang.net> In-Reply-To: <4F615880.6080005@syslang.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331848200 news.xs4all.nl 6860 [2001:888:2000:d::a6]:56234 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21716 Le 15/03/2012 03:48, Steven W. Orr a écrit : > On 3/14/2012 6:07 AM, Gelonida N wrote: >> Hi, >> >> >> At the moment I use ConfigParser >> http://docs.python.org/library/configparser.html >> for one of my applications. >> >> >> Now I'm looking for a library, which behaves like config parser, but >> with one minor difference. >> >> The write() mehtod should keep existing comments. >> >> Does anybody know or implement something like this or is there as >> switrch, that I overlooked in hte documentaiton. >> >> > > I use ConfigObj. > Sure configObj is a must...I use it too. http://www.voidspace.org.uk/python/configobj.html Cheers Karim