I'm creating a config file to hold configuration/properties settings for my project that frequently change, such as file paths. What's the standard name/extension for such a file? (e.g. in Java I've used config.xml, in VB.NET I've used App.config...)
+1
A:
First, consider using ConfigParser (configparser in 3.0, so the documentation says). That doesn't solve the naming problem, but it is a readable alternative to xml for most configuration needs.
Whatever name you use, make all the parts meaningful. I would probably use something like appName.cfg, where appName identifies your application, or the part of the application the configuration is for.
Pierce
2010-05-17 15:15:13
Thanks! I am planning on using ConfigParser, was just wondering if there are any accepted or widely used naming conventions for the file
froadie
2010-05-17 15:17:26
A:
Ok, I've asked around where I work and researched a little, and this is what I've come up with as suggestions:
- settings.ini
- applicationName.config
- applicationName.cfg
If anyone has any other suggestions, feel free to add...
froadie
2010-05-17 15:45:43
+1
A:
The docs seem to use .cfg
On Windows, many people (such as mercurial) use .ini
blokeley
2010-05-17 16:22:55