diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-05-28 08:16:16 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-05-28 08:16:16 +0200 |
commit | 7287b75301a53bae723579b145448d43304272af (patch) | |
tree | df6d1a4595f3352a8c90ce9cba0e71ea0269e98b /examples/hdf5widget.py | |
parent | 3e5dcad207c1eadeb74fb53f524c3a94fbe19096 (diff) | |
parent | a763e5d1b3921b3194f3d4e94ab9de3fbe08bbdd (diff) |
Update upstream source from tag 'upstream/0.10.1+dfsg'
Update to upstream version '0.10.1+dfsg'
with Debian dir 6b2d4eeabb68177b2b91df4d7527306d5e19409d
Diffstat (limited to 'examples/hdf5widget.py')
-rwxr-xr-x | examples/hdf5widget.py | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/examples/hdf5widget.py b/examples/hdf5widget.py index bf92d4e..c344bec 100755 --- a/examples/hdf5widget.py +++ b/examples/hdf5widget.py @@ -33,7 +33,9 @@ import logging import sys import tempfile + import numpy +import six logging.basicConfig() _logger = logging.getLogger("hdf5widget") @@ -50,15 +52,12 @@ import h5py import silx.gui.hdf5 import silx.utils.html -from silx.third_party import six from silx.gui import qt from silx.gui.data.DataViewerFrame import DataViewerFrame from silx.gui.widgets.ThreadPoolPushButton import ThreadPoolPushButton -try: - import fabio -except ImportError: - fabio = None +import fabio + _file_cache = {} @@ -713,26 +712,25 @@ class Hdf5TreeViewExample(qt.QMainWindow): content.layout().addStretch(1) - if fabio is not None: - content = qt.QGroupBox("Create EDF", panel) - content.setLayout(qt.QVBoxLayout()) - panel.layout().addWidget(content) + content = qt.QGroupBox("Create EDF", panel) + content.setLayout(qt.QVBoxLayout()) + panel.layout().addWidget(content) - combo = qt.QComboBox() - combo.addItem("Containing all types", get_edf_with_all_types) - combo.addItem("Containing 100000 datasets", get_edf_with_100000_frames) - combo.activated.connect(self.__edfComboChanged) - content.layout().addWidget(combo) + combo = qt.QComboBox() + combo.addItem("Containing all types", get_edf_with_all_types) + combo.addItem("Containing 100000 datasets", get_edf_with_100000_frames) + combo.activated.connect(self.__edfComboChanged) + content.layout().addWidget(combo) - button = ThreadPoolPushButton(content, text="Create") - button.setCallable(combo.itemData(combo.currentIndex())) - button.succeeded.connect(self.__fileCreated) - content.layout().addWidget(button) + button = ThreadPoolPushButton(content, text="Create") + button.setCallable(combo.itemData(combo.currentIndex())) + button.succeeded.connect(self.__fileCreated) + content.layout().addWidget(button) - self.__edfCombo = combo - self.__createEdfButton = button + self.__edfCombo = combo + self.__createEdfButton = button - content.layout().addStretch(1) + content.layout().addStretch(1) option = qt.QGroupBox("Tree options", panel) option.setLayout(qt.QVBoxLayout()) |