photo/openphoto-python — pull request #32 by sneakypete81 (2013-05-06 15:49:40+00:00)
Title: Allow config files to be used everywhere

Config files are not just useful from the command line, They're also a handy way of specifying the host's OAuth credentials within the Python environment.

This PR refactors the config parser into the OpenPhoto class. This extends the current method of creating an OpenPhoto client:

client = OpenPhoto(host, consumer_key, consumer_secret, token, token_secret)

If the host isn't specified, it loads the default config file:

client = OpenPhoto()

Alternate config files can also be used:

client = OpenPhoto(config_file="config_name")
client = OpenPhoto(config_file="/path/to/config_file")

Other updates:
* The README files have been updated to make this clear.
* The commandline tool now explains how to create credentials (closes #10).
* Add config file unit tests.
* Use config files to specify test servers ("test" by default, can be overridden using the OPENPHOTO_TEST_CONFIG environment variable).