right-trim lines
Python 2.5 compatibility. fixes #140