Why doesn't the 2to3 tool that ships with python work for them? I rarely write python but I've had to convert from python 2 to 3 several times and it has always work fine. Are there gaps in 2to3 which I haven't encountered that can't be fixed?
with open("a", "rb") as f:
with open("b", "w") as g:
g.write(">" + f.read(1))
There are also conversions in Python 2 between byte and string which aren't supported in Python 3: s = "123".encode("hex")
t = "abcd".decode("hex")