Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'cpython': 0.05; 'specific.': 0.09; 'sure,': 0.09; 'apache': 0.13; 'file,': 0.15; '.py': 0.16; 'bios': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'jumping': 0.16; 'magic.': 0.16; 'simplest': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'config': 0.17; '>>>': 0.18; 'code.': 0.20; 'changes': 0.20; 'diverse': 0.22; 'elements': 0.23; 'header:In-Reply-To:1': 0.25; 'guess': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'chris': 0.28; 'behaviour': 0.29; "d'aprano": 0.29; 'steven': 0.29; 'code': 0.31; 'file': 0.32; 'to:addr:python-list': 0.33; 'changed': 0.34; 'received:google.com': 0.34; 'thanks': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'really': 0.36; 'but': 0.36; 'quite': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'think': 0.40; 'your': 0.60; "you've": 0.61; 'first': 0.61; 'more': 0.63; 'subject: & ': 0.67; 'sector': 0.72; '2013': 0.84; 'amongst': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=qMAUzWNbH0aj65wbVzr2o+TEDq8eosDglinK78ni/84=; b=EDKUJ2mbBpjSZQrWOIlWdoMTQl1iWYmBD23z3WmvhN/UxX2LSDZvnuT2nkGuXDINnB to/kV+IewWZpF7skySFkE4CWxpWJh1kJQtW5lf6fPr/yTEmmvPk4jgr1+1nxDFMZhhl6 2/Mrh3xUIXGj/V64H8HEVNp39xU5u/OLIfG2WbwCL7Lq0eUzFKHmfZsdQ8NkC8Fqy/Az 93L3An2TB4kc20JJGD2dCwyyHjTetVIEkGza/MSm17JJ1wxSqLhbV04+7ikDSS77jJ/c OHf4x0xNyJtjCwrKjjAdm8EpVG6ZMAEK+RcodMh9vk01sZ7G1goVf7DJZIZ6x1b6gEE1 IUBA== MIME-Version: 1.0 X-Received: by 10.68.8.69 with SMTP id p5mr43127491pba.212.1362550155594; Tue, 05 Mar 2013 22:09:15 -0800 (PST) In-Reply-To: <5136cc21$0$30001$c3e8da3$5496439d@news.astraweb.com> References: <61520ad1-9e3c-4eec-b1d9-8a9d8fc7bf0c@googlegroups.com> <5136b87c$0$30001$c3e8da3$5496439d@news.astraweb.com> <78a2e6bc-e37a-4016-9aba-73561f204986@googlegroups.com> <5136cc21$0$30001$c3e8da3$5496439d@news.astraweb.com> Date: Wed, 6 Mar 2013 17:09:15 +1100 Subject: Re: Config & ConfigParser From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362550159 news.xs4all.nl 6974 [2001:888:2000:d::a6]:48995 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40606 On Wed, Mar 6, 2013 at 3:54 PM, Steven D'Aprano wrote: > On Wed, 06 Mar 2013 15:19:53 +1100, Chris Angelico wrote: > >> On Wed, Mar 6, 2013 at 3:07 PM, Chuck wrote: >>> I guess my question was more what is a config.file & why/how do I use >>> one. Thanks >> >> In its simplest form, a config file is one way to change a program's >> behaviour without editing the code. > > I don't think that's quite right, because your code has to be changed to > read the data from the configuration file in the first place. It doesn't > just happen by magic. Sure, but once you've made your code read from the config file, you can then edit the file only and it changes the program's actions. Of course, that's an *incredibly* broad description; amongst its coverage are such diverse elements as Apache reading an HTML file to serve, CPython reading a .py file, and the ROM BIOS reading a boot sector and jumping to it... but based on the OP's question I couldn't really be any more specific. ChrisA