X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=hooke%2Fdriver%2Fhdf5.py;h=64f09beed26431e6aac1b794098bd96249b9c404;hp=4a05474339eee56c38d65d48bd76901f864432ef;hb=30d5d93368e3170161f6a9d4f94dc8f0f958277a;hpb=7762de28cee60f98882d72db0c2ae2c6009ac465 diff --git a/hooke/driver/hdf5.py b/hooke/driver/hdf5.py index 4a05474..64f09be 100644 --- a/hooke/driver/hdf5.py +++ b/hooke/driver/hdf5.py @@ -4,15 +4,15 @@ # # This file is part of Hooke. # -# Hooke is free software: you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation, either -# version 3 of the License, or (at your option) any later version. +# Hooke is free software: you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # -# Hooke is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. +# Hooke is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +# Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with Hooke. If not, see @@ -21,6 +21,8 @@ """Driver for text-exported HDF5 files from Igor pro """ +import os.path + from .. import curve as lhc from .. import libhooke as lh @@ -33,13 +35,12 @@ class hdf5Driver(lhc.Driver): self.lines=list(self.filedata.readlines()) self.filedata.close() - self.filetype='hdf5' - self.experiment='smfs' - def close_all(self): self.filedata.close() def is_me(self): + if os.path.isdir(path): + return False self.raw_header=self.lines[0] if 'IGP-HDF5-Hooke' in self.raw_header: