Simultaneous Python2.x and Python3.x compatibility.

Basically only print->print() and StringIO moved to "io" module. Tested with Python 2.7, 3.3 and 3.4.