From 177530d65785d39dcb4df8ddb16a61597c92e775 Mon Sep 17 00:00:00 2001 From: jim Date: Thu, 24 Sep 2015 18:45:49 -0500 Subject: [PATCH] #66 refactored init --- nd2reader/interface.py | 11 ++++++----- nd2reader/{driver => }/version.py | 0 2 files changed, 6 insertions(+), 5 deletions(-) rename nd2reader/{driver => }/version.py (100%) diff --git a/nd2reader/interface.py b/nd2reader/interface.py index b02c4c0..fa48a92 100644 --- a/nd2reader/interface.py +++ b/nd2reader/interface.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- from nd2reader.model import ImageGroup -from nd2reader.driver import get_driver -from nd2reader.driver.version import get_version +from nd2reader.parser import get_parser +from nd2reader.version import get_version import warnings @@ -12,10 +12,11 @@ class Nd2(object): """ def __init__(self, filename): - self._filename = filename version = get_version(filename) - self._driver = get_driver(filename, version) - self._metadata = self._driver.get_metadata() + parser = get_parser(filename, version) + self._driver = parser.driver + self._metadata = parser.metadata + self._filename = filename def __repr__(self): return "\n".join(["" % self._filename, diff --git a/nd2reader/driver/version.py b/nd2reader/version.py similarity index 100% rename from nd2reader/driver/version.py rename to nd2reader/version.py