Basic python3 compatibility, via the 'six' module.

@tarekziade r?