davisp/ghp-import — pull request #3 by aliles (2012-05-06 11:16:26+00:00)
Title: Enable support for both Python2 and Python3.

Adds support for Python3.

Unicode support is added with short compatibility function to encode unicode objects to byte strings before being written to pipe objects, which only accept bytes. The `to_bytes` function uses `isinstance` to determine if the text is already bytes and if not attempts to encode it using the default encoding.

Removal of the print statement is handled by replacing uses of print with a write call on `sys.stdout`. Importing print_function fron [__future__](http://docs.python.org/library/__future__.html) wasn't used as this as only added in Python 2.6.