[Biopython-dev] Configuration files

Tiago Antão tiagoantao at gmail.com
Tue Oct 9 14:27:18 UTC 2007


Would it be interesting to have something like
config = Bio.Config.getConfig()
fdist_path = config['PopGen.FDistDir']

Something that:
1. Would allow for a standard configuration mechanism (as opposed to
having different styles for each module/author)
2. Would abstract away how the configuration is stored (registry, conf
file, ...)

If there was an agreement on doing this (or something along these
lines), I would volunteer the time to do it.

On 10/8/07, Peter <biopython-dev at maubp.freeserve.co.uk> wrote:
> Tiago Antão wrote:
> > Hi,
> >
> > Is there any (Biopython standard) way to configure Biopython during
> > runtime? When writing code sometimes I think it would be very
> > convenient (especially to the programmer using Biopython) to abstract
> > some configuration parameters away from the code. Things like the
> > location of binaries, hosts, user names (and maybe passwords) of
> > databases, timeout parameters, etc. These could be stored on a
> > configuration file (or registry entry, or whatever) thus saving users
> > to have to deal in the code with supplying these...
> > Just an idea...
>
> This sounds like a fairly general thing (i.e. for all of python) rather
> than being Biopython specific.
>
> For example, I find a lot of my scripts have a few if statements at the
> top setting locations of files and executables based on which
> user/machine I'm running on (I use both Windows and a couple of Linux
> boxes with different user names).
>
> e.g. Where are the blast executables, the blast databases, and my genome
> collection, ...
>
> Peter
>
>


-- 
http://www.tiago.org/ps




More information about the Biopython-dev mailing list