Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Where to put configuration/data files

Reply
Thread Tools

Where to put configuration/data files

 
 
Jay Bloodworth
Guest
Posts: n/a
 
      01-25-2009
Is there a nice cross-platform way to figure out the Right (tm) place to
store configuration files and other data?

Jay

 
Reply With Quote
 
 
 
 
Aahz
Guest
Posts: n/a
 
      02-02-2009
In article <mailman.7995.1232937535.3487.python->,
Jay Bloodworth <> wrote:
>
>Is there a nice cross-platform way to figure out the Right (tm) place to
>store configuration files and other data?


For what purpose? Global program config, user config, what?
--
Aahz () <*> http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote
programs, then the first woodpecker that came along would destroy civilization.
 
Reply With Quote
 
 
 
 
Tim Chase
Guest
Posts: n/a
 
      02-02-2009
>> Is there a nice cross-platform way to figure out the Right
>> (tm) place to store configuration files and other data?

>
> For what purpose? Global program config, user config, what?


I've found three main categories of settings like Aahz describes
(of which I've used all in a single application):

global settings:
I usually keep these in the shared data-store (database or
web-site/service). This can include both global application
settings such as the name of the institution running the app, or
certain business-rules; and global user settings such as name,
general preferences, colorschemes, etc.

machine-specific settings:
this relates to things like particular hardware configurations
(path to the CD drive, resource-names/configurations for things
like barcode/mag-stripe scanners, etc), or which server to
connect to. I usually store these in my application directory on
Win32, or in /etc on *nix boxes.

User-specific per-machine settings:
This can include things like preferred window-layout (which may
change depending on screen-size), stored
passwords/authentication, cache-locations,
local document stores, etc.


There's one other odd-ball category I've seen but not used:
portable storage on a USB drive. It sorta crosses these
boundaries being a bit of each (it's USB-drive specific, but can
be moved from machine to machine).


Choose your best storage location by thinking what a user/admin
would want for each setting. Is it a global setting that all
users need? put it in a network store. Is it something that
pertains to a particular machine? store it in either a
machine-global repository or a user-specific repository accordingly.

-tkc




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why does the following with Queue, q.put('\x02', True) not put itin the queue? Gabriel Rossetti Python 3 04-25-2008 03:41 PM
where to put files so they can't be served by IIS Andy Fish ASP .Net 3 08-11-2004 06:00 PM
how can I put jsp files with html files Justin Mencl Java 3 02-08-2004 05:48 PM
how to put the code files where you want? Peter Row ASP .Net 6 12-22-2003 08:34 AM
Which files to put in web server RA ASP .Net 3 10-15-2003 01:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57