From feda39834654bed6a571ee5337e228ccd6c68572 Mon Sep 17 00:00:00 2001 From: Tom Smith Date: Mon, 23 May 2016 11:29:24 +0100 Subject: [PATCH] make izip python 2 & 3 compatible --- umi_tools/extract.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/umi_tools/extract.py b/umi_tools/extract.py index f98aa632..f48d5b27 100644 --- a/umi_tools/extract.py +++ b/umi_tools/extract.py @@ -83,7 +83,15 @@ ''' import sys -from itertools import izip + +# python 3 doesn't require izip +try: + # Python 2 + from itertools import izip +except ImportError: + # Python 3 + izip = zip + import umi_tools.Utilities as U