Search code examples
pythonsettings

What's the official way of storing settings for Python programs?


Django uses real Python files for settings, Trac uses a .ini file, and some other pieces of software uses XML files to hold this information.

Are one of these approaches blessed by Guido and/or the Python community more than another?


Solution

  • Depends on the predominant intended audience.

    If it is programmers who change the file anyway, just use python files like settings.py

    If it is end users then, think about ini files.