In <5520ec67-bc4e-4f81-b27a-cf1f8c8de...@v11g2000prb.googlegroups.com> 
Alexander Schatten <asch...@gmail.com> writes:

> I mean, this is something very common: you write a program or a script
> and want to load some configuration data.

There are several good ways to do it:

+ Assume the config file is in the current directory (crude, but it can
  work)

+ Put the config file in a known location (i.e. /etc/foorc, ~/.foorc)

+ Put the location of the config file in an environment variable

+ As part of your application's install process, ask the user where the
  config file will be stored, and record their answer

-- 
John Gordon                   A is for Amy, who fell down the stairs
gor...@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to