PyBreeder icon indicating copy to clipboard operation
PyBreeder copied to clipboard

Changes for python3

Open arnout opened this issue 5 years ago • 1 comments

Modern systems have /usr/bin/python pointing to python3 instead of python2, so breeder must work with python3 as well.

python3 requires bytes for base64 encoding and decoding and for zlib compression. To simplify things, open the file as binary for compressed or binary snake, text otherwise.

The result of base64 has to be converted back to text. This is different for python2 and python3, so use a version-dependent function d() for this. Since the result of base64 is pure ascii, we can use the ascii codec for this conversion.

breed_gtk_image wasn't tested but it looks OK.

arnout avatar Dec 08 '20 16:12 arnout

could someone merge?

leobastiani avatar Jul 18 '24 11:07 leobastiani

Haha, sorry about the absolutely ridiculous delay. Thanks for doing this!

BjarniRunar avatar Feb 26 '25 16:02 BjarniRunar