if sys.version_info >= (3,0):
def str2bytes(sval):
return sval.encode("latin1")
unicode = str
else:
def str2bytes(sval):
if isinstance(sval, str):
return sval
return sval.encode("latin1")
This is what I use to solve the opposite problem. It should gi
I got to start a new django 1.8-project in python 3.4 for once, and happily
coded away. Turns out, the PaaS it needs to run on has a broken python 3.4,
so... my code now needs to work in 2.7.8.
Everything works in both versions except I need to read from an uploaded
file, bot in the web and from t
2 matches
Mail list logo