Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:skip:c 10': 0.07; 'doubles': 0.09; 'namespace': 0.09; 'received:internal': 0.09; 'python': 0.10; 'variables': 0.15; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'wrote:': 0.16; 'config': 0.18; 'module,': 0.18; 'aug': 0.20; 'import': 0.24; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'consisting': 0.29; 'subject:) ': 0.32; 'michael': 0.33; 'tue,': 0.34; 'file': 0.34; 'exist': 0.35; 'but': 0.36; 'basic': 0.36; 'modules': 0.36; 'tools,': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'well.': 0.40; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'from:no real name:2**0': 0.60; 'your': 0.60; 'header:Message-Id:1': 0.61; 'sharing': 0.64; 'between': 0.65 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Y617MTuSMLxjHdXXErql9Fj5gzQ=; b=RQcwZq AmUTGGgjxoZyJ3yGnlkIQRxUJGj29NGD1y79C+1kuhJBjk77aMWBJJHlH9sLaqpY NDXNFztSg1/nwmB6S51qRq1ABQYijsnGhJkodoFY7Xh4/yL8zTJWiTfiS4wOIJv2 MMxBj4xMB9icS7VedL0SY06YFFiwmA0mPj+jc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Y617MTuSMLxjHdX XErql9Fj5gzQ=; b=I4S+bKdppA7MRaTF+l/1XnliyXlUTicuH2DTlC1bryG9xZk H57eur7KVsk1hQKFWno3F0VGJrUvfAachRnLdVK72VMHtI3gFQD3117FeehoUWnP mU0OPJL9qn6tz3PN9+xzB/J3pTq/cHt23Ybwjj9YYB97nu6R6IrBPy866Hzc= X-Sasl-Enc: XHqEgm5r9Bnj4LrVm59+vVb4yf1phj7UOpQfFeouz/Kl 1438742671 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-65e7eb15 In-Reply-To: <55C16796.9060101@gmail.com> References: <87k2teq9tb.fsf@Equus.decebal.nl> <663ad259-48e0-4eec-a946-7cd03805ddb1@googlegroups.com> <85y4hqkepb.fsf@benfinney.id.au> <55C16796.9060101@gmail.com> Subject: Re: Most Pythonic way to store (small) configuration Date: Tue, 04 Aug 2015 22:44:31 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1438742674 news.xs4all.nl 2883 [2001:888:2000:d::a6]:43303 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94989 On Tue, Aug 4, 2015, at 21:32, Michael Torrie wrote: > In many of my projects I put basic config variables in a file like > config.py and import that in each module that needs it. The config > module doubles as a global namespace for sharing between modules as well. What about JSONP? That is, a file consisting exactly of "config_data = [JSON object]" That would get you some of the benefits of having your config file exist as a python module, but still allow it to be examined by other tools, written out, etc.