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


Groups > comp.lang.python > #78501

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

Return-Path <rosuav@gmail.com>
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; 'subject:Python': 0.06; '(b)': 0.07; 'separately': 0.09; 'subject:module': 0.09; 'subject:skip:c 10': 0.09; 'cc:addr:python-list': 0.11; 'question.': 0.14; '(server,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hardware.': 0.16; 'port,': 0.16; 'subject:etc.': 0.16; 'subject:values': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'file,': 0.19; 'cc:addr:python.org': 0.22; '(a)': 0.24; 'config': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'script': 0.25; 'header:In-Reply-To:1': 0.27; '(c)': 0.29; 'am,': 0.29; 'database,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'usually': 0.31; 'credentials': 0.31; 'subject:what': 0.31; 'file': 0.32; 'run': 0.32; 'becomes': 0.33; 'guess': 0.33; 'trouble': 0.34; 'sense': 0.34; 'maybe': 0.34; 'could': 0.34; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'changing': 0.37; 'files': 0.38; 'issue': 0.38; 'rather': 0.38; 'how': 0.40; 'even': 0.60; 'more': 0.64; 'situation': 0.65; 'subject:. ': 0.67; 'production': 0.68; 'different.': 0.84; 'end.': 0.84; 'situations,': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=H0KKN+ObB/bhHXcdRsIxEhubfK0heTczPuGxYVFLhJM=; b=haSQDVMTdoUUQ0SNf2aRYx4gQRMD+cCgjtklZwunIeaB7bLJ2KFUdJoUysY0FIRiw+ 3T6zEI9bCVCk0amA/lMHmpg+V71D9lMi98d3dYri3hMiWRXwZuQwIrwncmlNGMdMZqKX kDIVkyepOgWLQ9uj2t/qzeQoY+IvTRJrXDkB+JE9pxIetuiiQ2FmwX18xy8yURwl60o4 59v0+8myN/dvijjju5pss9UUa6ca7VyUjhe/bgHJd26EeaXDCYBOxnxLNQu1a9tGRzzp RI1Jd88FuhEbObw/t9dRi5S4Ejxf5xo24Beqr299jT2jS90lIV2KutNTI/WF3yrSHR3L Terw==
MIME-Version 1.0
X-Received by 10.112.78.98 with SMTP id a2mr44596726lbx.48.1412099348516; Tue, 30 Sep 2014 10:49:08 -0700 (PDT)
In-Reply-To <3u5rfb-mct.ln1@chris.zbmc.eu>
References <54hqfb-nan.ln1@chris.zbmc.eu> <36d7ddca-29f4-403c-a64d-611e187afc3a@googlegroups.com> <bgtqfb-ndq.ln1@chris.zbmc.eu> <a140612a-a30d-43eb-93a3-bc08b76b5721@googlegroups.com> <mailman.14489.1412095890.18130.python-list@python.org> <2ea96bcf-e905-4d77-a105-82b27715aa6e@googlegroups.com> <3u5rfb-mct.ln1@chris.zbmc.eu>
Date Wed, 1 Oct 2014 03:49:08 +1000
Subject Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14493.1412099356.18130.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1412099356 news.xs4all.nl 2881 [2001:888:2000:d::a6]:59085
X-Complaints-To abuse@xs4all.nl
Path csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:78501

Show key headers only | View raw


On Wed, Oct 1, 2014 at 3:30 AM,  <cl@isbd.net> wrote:
> The main trouble with this approach is that I need some way to have
> the python/config file available at the 'home' end of this as well as
> at the 'remote' end.  I guess I could write a copy of the file into
> the database but then I have the editing issue again, changing it
> becomes messy.  If it's not in the database then how do I 'tie' it to
> the data?

That's a design question. Maybe it's better for you to do your config
in the database. I usually find that these config files include
database credentials (server, port, user name, password), so they have
to be (a) outside the database, (b) outside source control, and (c)
separately configurable for test and production systems, even if they
run on the exact same hardware. So for those situations, it makes more
sense to have them in a script or INI file, rather than the database.
Your situation may well be completely different.

ChrisA

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


Thread

Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 12:35 +0100
  Re:Keepin constants, configuration values, etc. in Python - dedicated module or what? Dave Angel <davea@davea.name> - 2014-09-30 09:14 -0400
    Re: Re:Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 15:55 +0100
      Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Dave Angel <d@davea.name> - 2014-10-02 14:50 -0400
  Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 06:15 -0700
    Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 16:06 +0100
      Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? jkn <jkn_gg@nicorp.f9.co.uk> - 2014-09-30 08:59 -0700
      Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 09:39 -0700
        Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 02:51 +1000
          Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 10:01 -0700
            Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 03:15 +1000
              Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 10:31 -0700
                Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 03:46 +1000
              Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-02 00:49 +1000
                Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-02 00:55 +1000
            Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 18:30 +0100
              Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 03:49 +1000
        Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-10-16 18:24 -0700
  Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? "Neil D. Cerutti" <neilc@norwich.edu> - 2014-09-30 12:16 -0400
    Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 18:50 +0100

csiph-web