From 6b6393ff5686f744ee0894c7c4e48a376412d45f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 13 Feb 2016 22:48:38 +0100 Subject: [PATCH] gui: remove console --- artiq/frontend/artiq_gui.py | 8 ++------ artiq/gui/console.py | 40 ------------------------------------- 2 files changed, 2 insertions(+), 46 deletions(-) delete mode 100644 artiq/gui/console.py diff --git a/artiq/frontend/artiq_gui.py b/artiq/frontend/artiq_gui.py index 3e8739894..4de976196 100755 --- a/artiq/frontend/artiq_gui.py +++ b/artiq/frontend/artiq_gui.py @@ -17,7 +17,7 @@ from artiq.tools import * from artiq.protocols.pc_rpc import AsyncioClient from artiq.gui.models import ModelSubscriber from artiq.gui import (state, experiments, shortcuts, explorer, - moninj, datasets, applets, schedule, log, console) + moninj, datasets, applets, schedule, log) def get_argparser(): @@ -129,9 +129,6 @@ def main(): logmgr = log.LogDockManager(dock_area, sub_clients["log"]) smgr.register(logmgr) - d_console = console.ConsoleDock(sub_clients["datasets"], - rpc_clients["dataset_db"]) - # lay out docks if os.name != "nt": dock_area.addDock(d_ttl_dds.dds_dock, "top") @@ -143,8 +140,7 @@ def main(): dock_area.addDock(d_datasets, "above", d_applets) dock_area.addDock(d_shortcuts, "above", d_datasets) dock_area.addDock(d_explorer, "above", d_shortcuts) - dock_area.addDock(d_console, "bottom") - dock_area.addDock(d_schedule, "above", d_console) + dock_area.addDock(d_schedule, "bottom") # load/initialize state smgr.load() diff --git a/artiq/gui/console.py b/artiq/gui/console.py deleted file mode 100644 index 0ec286d55..000000000 --- a/artiq/gui/console.py +++ /dev/null @@ -1,40 +0,0 @@ -import asyncio - -from quamash import QtCore -from pyqtgraph import console, dockarea - - -_help = """ -This is an interactive Python console. - -The following functions are available: - get_dataset(key) - set_dataset(key, value, persist=False) [asynchronous update] - del_dataset(key) [asynchronous update] - -""" - -class ConsoleDock(dockarea.Dock): - def __init__(self, dataset_sub, dataset_ctl): - dockarea.Dock.__init__(self, "Console") - self.setMinimumSize(QtCore.QSize(720, 300)) - self.dataset_sub = dataset_sub - self.dataset_ctl = dataset_ctl - ns = { - "get_dataset": self.get_dataset, - "set_dataset": self.set_dataset, - "del_dataset": self.del_dataset - } - c = console.ConsoleWidget(namespace=ns, text=_help) - self.addWidget(c) - - def get_dataset(self, k): - if self.dataset_sub.model is None: - raise IOError("Datasets not available yet") - return self.dataset_sub.model.backing_store[k][1] - - def set_dataset(self, k, v): - asyncio.ensure_future(self.dataset_ctl.set(k, v)) - - def del_dataset(self, k): - asyncio.ensure_future(self.dataset_ctl.delete(k))