Read deployment configuration file.
First looks on the command line for a desired config file, if it's not
on the command line, then looks for 'setup.py' in the parent of the
directory where this module is located.
If 'setup.py' is there, assumes that the application is started from
the project directory and should run in development mode and so loads the
configuration from a file called 'dev.cfg' in the current directory.
If 'setup.py' is not there, the project is probably installed and the
code looks first for a file called 'prod.cfg' in the current directory
and, if this isn't found either, for a default config file called
'default.cfg' packaged in the egg.
|