DescriptionPrepare for encoding changes in Python 3
This is most of the remaining diff for porting to Python 3,
but this also works in Python 2.4 already (even though not
strictly needed).
Individual changes:
1. Encode strings before hashing
Python 3 requires "bytes-like objects". Apparently we can already
do so in Python 2, even though not needed for correctness.
2. Submit bytes-like objects to processes
Encode strings before writing to input and decode result after reading
from output or error stream.
3. Open midi and musicxml files in binary mode
Only decode once we are sure that the content is not compressed.
Patch Set 1 #
MessagesTotal messages: 5
|