kala-tamin reading a configuration information only once in Python

reading a configuration information only once in Python

I'm using the ConfigParser to read the configuration information stored in a file. I'm able to read the content and use it across other modules in the project. I'm not sure if the configuration file is read every time I call config.get(parameters). How can I make sure that the configuration information is read only once and rest of the time its read from the cache.

Get/Set in the c++ world, faux-pas?


PHP - What should I call the information stored in my Page class?
I would try assigning the configuration to a variable..
Inheritance design using Interface + abstract class. Good practice?
configVariable = config.get(parameters).
PHP - Where is the best place to initiate a database class?
Then you can pass the configuration variable to other modules as necessary..
Inversion of Control in Compilers

Diamond inheritance (C++)

overloading constructors and reusing code


MustOverride Properties with mixed access level Get / Set
The default implementation of the ConfigParser class reads its data only once.



This isn't my answer, but user gimel came with this nifty solution: click . (You can check whole question pointed by this link, it is very similar to Yours.).

75 out of 100 based on 85 user ratings 885 reviews