# Path: liam2/config.py

# 
# Path: liam2/compat.py
# PY2 = sys.version_info[0] == 2
# 
# Path: liam2/utils.py
# class ExceptionOnGetAttr(object):
#     """
#     ExceptionOnGetAttr can be used when an optional part is missing
#     so that an exception is only raised if the object is actually used.
#     """
#     def __init__(self, exception):
#         self.exception = exception
# 
#     def __getattr__(self, key):
#         raise self.exception


import locale
import warnings
import sys
from liam2 import config
from liam2.compat import PY2
from liam2.utils import ExceptionOnGetAttr
    from qtpy import QtWidgets
    from vitables.vtapp import VTApp
        from vitables.vtapp import VTApp
    from vitables.preferences import vtconfig
except ImportError as e:
    msg = "the 'view' command is not available because 'vitables' does not seem to be installed correctly (%s)." % e
    print("Warning:", msg)
    if not config.debug and not PY2:
        e = ImportError(msg).with_traceback(sys.exc_info()[2])
    VTApp = ExceptionOnGetAttr(e)
    QtWidgets = ExceptionOnGetAttr(e)


def viewhdf(filepaths):
    app = QtWidgets.QApplication(filepaths)

    # These imports must be done after the QApplication has been instantiated
    with warnings.catch_warnings():
        # ignore deprecation warnings just for this import
        warnings.filterwarnings("ignore", category=DeprecationWarning)


    # Specify the organization's Internet domain. When the Internet
    # domain is set, it is used on Mac OS X instead of the organization
    # name, since Mac OS X applications conventionally use Internet
    # domains to identify themselves
    app.setOrganizationDomain('vitables.org')
    app.setOrganizationName('ViTables')
    app.setApplicationName('ViTables')
    app.setApplicationVersion(vtconfig.getVersion())

    # Localize the application using the system locale
    # numpy seems to have problems with decimal separator in some locales
    # (catalan, german...) so C locale is always used for numbers.

# Path: liam2/config.py

# 
# Path: liam2/compat.py
# PY2 = sys.version_info[0] == 2
# 
# Path: liam2/utils.py
# class ExceptionOnGetAttr(object):
#     """
#     ExceptionOnGetAttr can be used when an optional part is missing
#     so that an exception is only raised if the object is actually used.
#     """
#     def __init__(self, exception):
#         self.exception = exception
# 
#     def __getattr__(self, key):
#         raise self.exception


# Path: liam2/view.py
import locale
import warnings
import sys
from liam2 import config
from liam2.compat import PY2
from liam2.utils import ExceptionOnGetAttr
    from qtpy import QtWidgets
    from vitables.vtapp import VTApp
        from vitables.vtapp import VTApp
    from vitables.preferences import vtconfig

except ImportError as e:
    msg = "the 'view' command is not available because 'vitables' does not seem to be installed correctly (%s)." % e
    print("Warning:", msg)
    if not config.debug and not PY2:
        e = ImportError(msg).with_traceback(sys.exc_info()[2])
    VTApp = ExceptionOnGetAttr(e)
    QtWidgets = ExceptionOnGetAttr(e)


def viewhdf(filepaths):
    app = QtWidgets.QApplication(filepaths)

    # These imports must be done after the QApplication has been instantiated
    with warnings.catch_warnings():
        # ignore deprecation warnings just for this import
        warnings.filterwarnings("ignore", category=DeprecationWarning)


    # Specify the organization's Internet domain. When the Internet
    # domain is set, it is used on Mac OS X instead of the organization
    # name, since Mac OS X applications conventionally use Internet
    # domains to identify themselves
    app.setOrganizationDomain('vitables.org')
    app.setOrganizationName('ViTables')
    app.setApplicationName('ViTables')
    app.setApplicationVersion(vtconfig.getVersion())

    # Localize the application using the system locale
    # numpy seems to have problems with decimal separator in some locales
    # (catalan, german...) so C locale is always used for numbers.

    locale.setlocale(locale.LC_ALL, '')