#!/usr/bin/env python

import sys
import os
from os.path import isdir, exists, join, walk, splitext, split, abspath

try:
    sys.exec_prefix = os.environ['PYTHONHOME']
except KeyError:
    pass

from PyQt4 import QtGui
import matplotlib
matplotlib.use('QT4Agg')

try:
    from thalassa.ui import QtMplUI
except ImportError:
    sys.path.append(abspath(join('..', 'thalassa')))
    sys.path.append(abspath('..'))
    from setup_utils import build_qt_ui
    build_qt_ui()

from thalassa.ui import QtMplUI

qApp = QtGui.QApplication(sys.argv)

aw = QtMplUI()
aw.show()
sys.exit(qApp.exec_())
