import time
import traceback
import sys, os

if __name__ == "__main__":
    #import os.path as osp
    d = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    sys.path = [os.path.join(d,'lib','util')] + sys.path + [d]

from PyQt4 import QtGui, QtCore
import LogWidgetTemplate
from acq4.pyqtgraph import FeedbackButton
import acq4.util.configfile as configfile
from acq4.util.DataManager import DirHandle
from acq4.util.HelpfulException import HelpfulException
from acq4.util.Mutex import Mutex
import numpy as np
from acq4.pyqtgraph import FileDialog
from acq4.util.debug import printExc
import weakref
import re

#from acq4.Manager import getManager

#WIN = None

Stylesheet = """