From 0a4e5a3f1c21518a5321020271170e7f66e5520b Mon Sep 17 00:00:00 2001 From: "david.verelst" Date: Tue, 4 Jun 2013 22:25:53 +0000 Subject: [PATCH] ignore import error for fig.py: depends on windows only libraries --- pywafo/src/wafo/__init__.py | 9 ++++++--- pywafo/src/wafo/kdetools.py | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pywafo/src/wafo/__init__.py b/pywafo/src/wafo/__init__.py index 9a0efe9..66bc46a 100644 --- a/pywafo/src/wafo/__init__.py +++ b/pywafo/src/wafo/__init__.py @@ -2,7 +2,7 @@ from info import __doc__ import misc import data -import demos +import demos import kdetools import objects import spectrum @@ -10,9 +10,12 @@ import transform import definitions import polynomial import stats -import interpolate -import fig +import interpolate import dctpack +try: + import fig +except ImportError: + print 'fig import only supported on Windows' try: from wafo.version import version as __version__ diff --git a/pywafo/src/wafo/kdetools.py b/pywafo/src/wafo/kdetools.py index bdd8868..4e78f62 100644 --- a/pywafo/src/wafo/kdetools.py +++ b/pywafo/src/wafo/kdetools.py @@ -24,7 +24,10 @@ from wafo.misc import meshgrid, nextpow2, tranproc #, trangood from wafo.wafodata import PlotData from wafo.dctpack import dct, dctn, idctn from wafo.plotbackend import plotbackend as plt -from wafo import fig +try: + from wafo import fig +except ImportError: + print 'fig import only supported on Windows' _TINY = np.finfo(float).machar.tiny