msoulier/tftpy — pull request #39 by ZuljinSBK (2013-11-24 14:13:50+00:00)
Title: Compatibility with Python 3.x

What was changed:
1) Modified setup.py to call 2to3 script. This will automatically introduce lots of Python 3 improvements during setup procedure.
2) Created to_bytes() and to_str() functions that will handle string conversion. These functions differ for both version of Python.
3) Changed internal representation of options value to int instead of string. AFAIK all TFTP options values are right now integers so this should work without any issue. I wanted integers because it is easier to handle them than strings in Python 2 and 3. Additionally lots of options value calculations are done using integers so this simplify some part of code.
4) Updated unittests to work with Python 3
5) Few small changes that increase compatibility between Python 2 and 3.