# You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import qkit import inspect import os import logging import sys import qkit.core.instrument_base as instrument import importlib from imp import reload # this is needed for py3 from qkit.core.lib.misc import get_traceback TB = get_traceback()() def _get_driver_module(name, do_reload=False): if name in sys.modules and not do_reload: return sys.modules[name] try: mod = importlib.import_module(name) if do_reload: reload(mod) except ImportError as e: fields = str(e).split(' ') if len(fields) > 0 and fields[-1] == name: logging.warning('Instrument driver %s not available', name)
# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #import gobject # YS: try to get rid of 32bit gobject from pygtk #import gtk # YS: try to get rid of GTK import logging import time from gettext import gettext as _L from qkit.core.lib.misc import exact_time, get_traceback #from lib.network.object_sharer import SharedGObject # YS: try to get rid of 32bit gobject from pygtk import os AutoFormattedTB = get_traceback() class FlowControl(object):#(SharedGObject): # YS: try to get rid of 32bit gobject from pygtk ''' Class for flow control of the QT measurement environment. ''' #__gsignals__ = { # 'measurement-start': (gobject.SIGNAL_RUN_FIRST, # gobject.TYPE_NONE,()), # 'measurement-end': (gobject.SIGNAL_RUN_FIRST, # gobject.TYPE_NONE,()), # 'measurement-idle': (gobject.SIGNAL_RUN_FIRST, # gobject.TYPE_NONE,()), # 'stop-request': (gobject.SIGNAL_RUN_FIRST, # gobject.TYPE_NONE,()),
# # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import logging import time from gettext import gettext as _L from qkit.core.lib.misc import exact_time, get_traceback AutoFormattedTB = get_traceback() class FlowControl(object): ''' Class for flow control of the QT measurement environment. ''' STATUS_STOPPED = 0 STATUS_RUNNING = 1 def __init__(self): self._status = 'starting' self._measurements_running = 0 self._abort = False
import code import inspect #import gobject # YS: try to get rid of 32bit gobject from pygtk import types import os import logging import sys import qkit.core.instrument as instrument from qkit.core.lib.config import get_config from qkit.core.insproxy import Proxy #from lib.network.object_sharer import SharedGObject # YS: try to get rid of 32bit gobject from pygtk from qkit.core.lib.misc import get_traceback TB = get_traceback()() def _set_insdir(): #dir = os.path.join(_config['execdir'], 'instrument_plugins') #sys.path.append(dir) #return dir dir = os.path.join(_config['rootdir'],'instruments') sys.path.append(dir) return dir # YS: deprecated core.instrument_plugin folder repalced by new one def _set_user_insdir(): ''' Setting directory for user-specific instruments. For this config['user_insdir'] needs to be defined. '''