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

This commit is contained in:
Robert Smallshire
2014-10-21 14:54:49 +02:00
parent 1abff28a40
commit ee228e2dc9
9 changed files with 274 additions and 23 deletions
+3 -1
View File
@@ -2,6 +2,8 @@ import itertools
import time
import os
from portability import izip
def pairwise(iterable):
"""Pairwise iteration.
@@ -14,7 +16,7 @@ def pairwise(iterable):
"""
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
return izip(a, b)
def contains_duplicates(sorted_iterable):