vvzen / parse-exr-header

Pure Python (no additional dependencies) helper module to read metadata from the header of OpenEXR files.
MIT License
38 stars 10 forks source link

add Python 3 compatibility #3

Closed jonaskluger closed 4 years ago

jonaskluger commented 4 years ago

Script is now working in Python 2 and 3. For Python 2: nothing changes. For Python 3: all bytes strings get converted to unicode string to be future prove and conform with Python 3 strings.

jonaskluger commented 4 years ago

2 by 'testing' I meant that it should work probably :-P

But sure, tests for Python 3 will follow!

jonaskluger commented 4 years ago

Just added one test that checks the entire metadata dictionary that is returned. The tests work for Python 2 and Python 3.

vvzen commented 4 years ago

Hi @jonaskluger ! thanks for taking the time to write new tests! I've checked against Python 2.7.15 and Python 3.8.2 and they're all passing. If you can stick to PEP8 that would be great, otherwise I'll run my formatter (yapf) after I've merged the branch. Let me know when I can merge it, I was planning of adding a small CLI to go along with this repo. Thanks!

jonaskluger commented 4 years ago

I did format the files. Cheers!