From 63a286d16719e5f180e16874fc2fd5ab04e90e97 Mon Sep 17 00:00:00 2001 From: Ruben Verweij Date: Fri, 17 Feb 2017 12:07:46 +0100 Subject: [PATCH] Hopefully fix Python 2 import error --- nd2reader/__init__.py | 2 +- nd2reader/{nd2parser.py => parser.py} | 2 +- nd2reader/{nd2reader.py => reader.py} | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename nd2reader/{nd2parser.py => parser.py} (99%) rename nd2reader/{nd2reader.py => reader.py} (96%) diff --git a/nd2reader/__init__.py b/nd2reader/__init__.py index 7a0be5f..64cff75 100644 --- a/nd2reader/__init__.py +++ b/nd2reader/__init__.py @@ -1,3 +1,3 @@ -from nd2reader.nd2reader import ND2Reader +from nd2reader.reader import ND2Reader __version__ = '2.1.3' diff --git a/nd2reader/nd2parser.py b/nd2reader/parser.py similarity index 99% rename from nd2reader/nd2parser.py rename to nd2reader/parser.py index 4cc02af..6d9459b 100644 --- a/nd2reader/nd2parser.py +++ b/nd2reader/parser.py @@ -12,7 +12,7 @@ from nd2reader.label_map import LabelMap from nd2reader.raw_metadata import RawMetadata -class ND2Parser(object): +class Parser(object): """ Parses ND2 files and creates a Metadata and driver object. """ CHUNK_HEADER = 0xabeceda CHUNK_MAP_START = six.b("ND2 FILEMAP SIGNATURE NAME 0001!") diff --git a/nd2reader/nd2reader.py b/nd2reader/reader.py similarity index 96% rename from nd2reader/nd2reader.py rename to nd2reader/reader.py index 700831d..0da55c2 100644 --- a/nd2reader/nd2reader.py +++ b/nd2reader/reader.py @@ -1,6 +1,6 @@ from pims import FramesSequenceND, Frame from nd2reader.exceptions import NoImageError -from nd2reader.nd2parser import ND2Parser +from nd2reader.parser import Parser class ND2Reader(FramesSequenceND): @@ -13,7 +13,7 @@ class ND2Reader(FramesSequenceND): # first use the parser to parse the file self._fh = open(filename, "rb") - self._parser = ND2Parser(self._fh) + self._parser = Parser(self._fh) # Setup metadata self.metadata = self._parser.metadata