Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 987
Steven Hepting Avatar asked Jun 08 '09 16:06

Steven Hepting


People also ask

What is config () in Python?

A Python configuration file is a pure Python file that populates a configuration object. This configuration object is a Config instance.


1 Answers

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.

like image 88
lprsd Avatar answered Sep 29 '22 18:09

lprsd