Improved portability between Python 2 and Python 3. Beginnings of code for writing SEG Y.