sripathikrishnan/redis-rdb-tools — pull request #25 by mcos (2013-03-22 20:26:20+00:00)
Title: Python 2.5 Support

Some of our servers are still on Python 2.5 and I wanted to get a profile of Redis on these servers using this tool. Here are some of the changes I made:

* If the `io` module isn't present, use `StringIO`
* If the `json` modulle isn't present, use `simplejson`
* Install `simplejson` as a prerequisite in `requirements.txt`
* Added a `utils` directory with a `namedtuple` implementation
* Used `array` from the `array` module with a type of `unsigned char` if the `bytearray` type isn't available.
* Used `StringIO` from the `StringIO` module if `BytesIO` from the `io` module isn't available

All tests pass on Python 2.5, 2.6 and 2.7.

I completely understand if you don't wish to pull in these changes, given that Python 2.5 support is extra work, I'm just happy to contribute in any way I can.

Thanks,
-Mark