uwmadison-chm / bioread

Utilities to work with files from BIOPAC's AcqKnowlege software
MIT License
65 stars 23 forks source link

Make python3 compatible #4

Closed quazgar closed 9 years ago

quazgar commented 9 years ago

Made the code compatible with python3 (also tested with 2.7, should work with 2.6), also made the histogram check for different bit resolutions and sample rates optional.

Plus small changes to the README.

njvack commented 9 years ago

Hm, I'd really rather the simple_layout stuff be part of its own PR; it's quite orthogonal to py3 compatibility. But with that and one other comment in the request itself, things look OK. I've gotta test it yet, but I'll try it out.

Thanks!

quazgar commented 9 years ago

Yes, you are right about the simple_layout. If necessary, we can split this up into different pull requests. It was actually one of the first things we did to the code because we typically deal with a few GB of acq data.

quazgar commented 9 years ago

Additional comment: The string test in AcqReader.read_file(cls, filelike) currently fails for unicode strings. Is using six a problem for you to do this test for both 2.x and 3? If not, I would use http://stackoverflow.com/a/20612311/232888 instead.

njvack commented 9 years ago

Six would be great. It's worth checking to see if there's anywhere else I've been assuming non-unicode strings :neutral_face:

quazgar commented 9 years ago

Closed this pull request in favor of the other two which I just created. There should be no changes between the other two combined and our master.