In the program and, obviously, influenced by how Java does something, I want to read a static file (log configuration file, actually) from a directory in the PYTHONPATH interpreter. I know I can do something like:
import foo
a = foo.__path__
conf = open(a[0] + "/logging.conf")
but I donβt know if this is the "Putin" way of doing something. How can I distribute the logging configuration file so that my application does not need external configuration to read it?
source
share