mraspaud/pyresample — pull request #17 by valgur (2014-12-07 16:06:03+00:00)
Title: Python 2/3 agnostic pyresample

The changes provided in this pull request fix incompatibilities with Python 3 in pyresample while still maintaining support for Python 2.

Most of the changes are pretty trivial. The only exception is the shmem_as_ndarray function in _multi_proc.py where I replaced the hand-rolled code with NumPy's readbuffer function. The internals of the multiprocessing package have changed in Python 3, so it needed to be modified anyway. The performance on resampling real-life data (a 5000x5000 subset of a TerraSAR-X image) was unaffected by this change.

I avoided having dependencies on the six compatibility library and used small snippets of code where necessary instead. If you prefer using six for this, it should be pretty straightforward to change (just add "from six.moves import range" and "from six import string_types, integer_types" where necessary).

All of the unit tests provided with pyresample pass for Python 2.6, 2.7, 3.3 and 3.4 (on a 64-bit Linux machine).

Also, thanks for creating this nice piece of software! I found it very useful for resampling & reprojecting TerraSAR-X and TanDEM-X data.