What is the default configuration file name and extension in Python?

I am creating a configuration file to store configuration settings / properties for my project that change frequently, such as file paths. What is the standard name / extension for such a file? (for example, in Java I used config.xml, in VB.NET I used App.config ...)

+5
source share
3 answers

First, consider using ConfigParser (configparser in version 3.0, so the documentation). This does not solve the naming problem, but for most configuration needs this is a readable alternative to xml.

, , . , , - appName.cfg, appName , .

+3

, , , :

  • settings.ini
  • applicationName.config
  • applicationName.cfg

- , ...

+2

Documents appear to be using .cfg

On Windows, many people (such as mercurial) use .ini

+2
source

All Articles