Resubmit of python refactor pull request

Python 3.x refactor of ThingM's Python libraries. 

Includes better test coverage, simpler use with a context manager and higher level functions for specifying colours.