Make this work for both Python 2 and 3, remove trailing whitespace
Merge pull request #1 from ollie/master

Make this work for both Python 2 and 3, remove trailing whitespace