From 5c5fa0e4900efeda6a5e015d1ac8398599ad4353 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 20 Jun 2016 12:50:02 -0400 Subject: [PATCH] pmincaverage: fix imports for Python 3 --- python/pmincaverage | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/pmincaverage b/python/pmincaverage index 98cbbda..2593656 100755 --- a/python/pmincaverage +++ b/python/pmincaverage @@ -5,7 +5,10 @@ from numpy import * from argparse import ArgumentParser import os.path import sys -import Queue +try: + import queue +except: + import Queue as queue def getslice(volhandle, slice, q,nslices): """collects hyperslabs for a particular volume handle. Designed to @@ -94,7 +97,7 @@ if __name__ == "__main__": # without multiprocessing, this queueing stuff probably doesn't make sense -- simplify print("SLICE: %i" % i) - q = Queue.Queue() + q = queue.Queue() for j in range(nfiles): t = getslice(j,i,q,nslices)