Simple support for Py3k

Same code works for py2.x and py3.
Don't sure what anybody need this except me.