@Acid_Snake I am having trouble rewriting the code. Python 3 reacts differently when calling
write() and when reading the .png and .mp3 files.
Python 2 reads those files as strings, while Python 3 reads them as bytes (as it should).
Now I did try to directly convert the read file into a string with
repr(), but no luck so far.
Here is my progress, the offsets are correct when I print
pkg.tell() after every write, but there are some weird things happening.
Edit 1:
When I compare the files in a hex viewer, I see that the Python 3 file contains a lot of C2 bytes, which is the only difference so far. Perhaps I can do a hacky workaround and delete them for now.
Edit 2:
It all boils down to the
chr() function between Python 2 and Python 3. I'm looking for a solution
Final edit:
Fixed it! Apparently Python 2 makes a bytearray with the
chr() function.
I accidentally made a pull request where I had an unused import in the code. I closed it (apparently I could've edited it if it was still open). I'm not sure if you can delete the closed pull request, but I made a new one which is good.