Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test():
from taurus.qt.qtgui.application import TaurusApplication
app = TaurusApplication(sys.argv)
form = PanelDescriptionWizard()
def kk(d):print d
Qt.qApp.SDM = SharedDataManager(form)
Qt.qApp.SDM.connectReader('111111', kk)
Qt.qApp.SDM.connectWriter('222222', form, 'thisisasignalname')
form.show()
sys.exit(app.exec_())
def main():
from taurus.qt.qtgui.application import TaurusApplication
from taurus.core.util import argparse
import sys
parser = argparse.get_taurus_parser()
parser.set_usage("%prog [options] [INIFILENAME]")
parser.set_description("taurus configuration viewer")
app = TaurusApplication(cmd_line_parser=parser,
app_name="taurusconfigbrowser",
app_version=taurus.Release.version)
args = app.get_command_line_args()
w = QConfigViewer()
w.show()
if len(args) == 1:
w.loadFile(args[0])
sys.exit(app.exec_())
def taurusCurveMain():
from taurus.qt.qtgui.extra_guiqwt.builder import make
from taurus.qt.qtgui.application import TaurusApplication
from guiqwt.plot import CurveDialog
from guiqwt.tools import HRangeTool
from taurus.qt.qtgui.extra_guiqwt.tools import TaurusCurveChooserTool, TimeAxisTool
import taurus.core.util.argparse
import sys
parser = taurus.core.util.argparse.get_taurus_parser()
parser.set_usage("%prog [options] [ [] ...]")
parser.set_description("a taurus application for plotting 1D data sets")
app = TaurusApplication(cmd_line_parser=parser, app_name="taurusplot2", app_version=taurus.Release.version)
args = app.get_command_line_args()
win = CurveDialog(edit=False, toolbar=True, wintitle="TaurusPlot2",
options=dict(title="", xlabel="xlabel", ylabel="ylabel"))
win.add_tool(HRangeTool)
win.add_tool(TaurusCurveChooserTool)
win.add_tool(TimeAxisTool)
plot = win.get_plot()
for a in args:
mx_my = a.split('|')
n = len(mx_my)
if n == 1:
mx, my = None, mx_my[0]
elif n == 2:
def main():
from taurus.qt.qtgui.application import TaurusApplication
from taurus.core.util import argparse
import sys
parser = argparse.get_taurus_parser()
parser.usage = "%prog [options] [hostname]"
app = TaurusApplication(cmd_line_parser=parser)
args = app.get_command_line_args()
if len(args) > 0:
host = args[0]
else:
host = taurus.Authority().getNormalName()
w = TaurusFilterPanel()
w.setWindowIcon(Qt.QIcon(":/actions/system-shutdown.svg"))
w.setWindowTitle("A Taurus Filter Example")
w.setModel(host)
w.show()
sys.exit(app.exec_())
def main():
import sys
import taurus.qt.qtgui.application
Application = taurus.qt.qtgui.application.TaurusApplication
app = Application.instance()
owns_app = app is None
if owns_app:
import taurus.core.util.argparse
parser = taurus.core.util.argparse.get_taurus_parser()
app = Application(sys.argv, cmd_line_parser=parser,
app_name="Spock Shell demo", app_version="1.0",
org_domain="Taurus", org_name="Tango community")
shell = demo()
if owns_app:
sys.exit(app.exec_())
else:
def main(argv=None):
import taurus.core.util.argparse
import taurus.qt.qtgui.application
targp = taurus.core.util.argparse
if argv is None:
import sys
argv = sys.argv
parser = targp.get_taurus_parser()
taurus_args, ipython_args = targp.split_taurus_args(parser, args=argv)
app = taurus.qt.qtgui.application.TaurusApplication(taurus_args,
cmd_line_parser=parser)
console_factory = TaurusConsoleFactory(ipython_args=ipython_args)
window = console_factory.new_window(kernels=[('ipython', 'IPython')])
window.create_tab_with_new_frontend(name='tango', label="Tango")
window.show()
app.exec_()
if False:
app = Qt.QApplication([])
args = sys.argv[1:]
#args = app.get_command_line_args()
#app = TaurusApplication(sys.argv)
if not args:
args = ['database']
else:
taurus.setLogLevel(taurus.Debug)
parser = argparse.get_taurus_parser()
parser.set_usage("%prog [options] devname [attrs]")
parser.set_description(
"Taurus Application inspired in Jive and Atk Panel")
parser.add_option("--config", "--config-file", dest="config_file", default=None,
help="use the given config file for initialization")
app = TaurusApplication(cmd_line_parser=parser, app_name="TaurusDevicePanel",
app_version=taurus.Release.version)
args = app.get_command_line_args()
options = app.get_command_line_options()
form = TaurusSearchTree()
# try:
# if options.tango_host is None:
#options.tango_host = taurus.Authority().getNormalName()
# form.setTangoHost(options.tango_host)
# except: pass
def trace(m):
print(m)
[setattr(form.tree, f, trace)
for f in ('info', 'warning', 'error', 'trace')]
def main():
"""hello"""
import sys
import taurus.qt.qtgui.application
Application = taurus.qt.qtgui.application.TaurusApplication
app = Application.instance()
owns_app = app is None
if owns_app:
import taurus.core.util.argparse
parser = taurus.core.util.argparse.get_taurus_parser()
parser.usage = "%prog [options] "
app = Application(sys.argv, cmd_line_parser=parser)
args = app.get_command_line_args()
if len(args) > 0:
args = map(str.lower, args)
else:
args = [ 'sys/tg_test/1/double_scalar' ]
def taurusCurveDlgMain():
from taurus.qt.qtgui.application import TaurusApplication
from taurus.qt.qtgui.extra_guiqwt.tools import TimeAxisTool
import taurus.core.util.argparse
import sys
parser = taurus.core.util.argparse.get_taurus_parser()
parser.set_usage("%prog [options] [ [] ...]")
parser.set_description("a taurus application for plotting 1D data sets")
parser.add_option("--demo", action="store_true", dest="demo",
default=False, help="show a demo of the widget")
parser.add_option("--window-name", dest="window_name",
default="Taurus Curve Dialog", help="Name of the window")
app = TaurusApplication(
cmd_line_parser=parser, app_name="Taurus Curve Dialog", app_version=taurus.Release.version)
args = app.get_command_line_args()
options = app.get_command_line_options()
# check & process options
if options.demo:
args.append('eval:rand(128)')
w = TaurusCurveDialog(edit=False, wintitle=options.window_name)
w.add_tool(TimeAxisTool)
# set model
if len(args) > 0:
w.setModel(args)
else:
def TaurusDevicePanelMain():
'''A launcher for TaurusDevicePanel.'''
import sys
from taurus.qt.qtgui.application import TaurusApplication
from taurus.core.util import argparse
parser = argparse.get_taurus_parser()
parser.set_usage("%prog [options] [devname [attrs]]")
parser.set_description("Taurus Application inspired in Jive and Atk Panel")
parser.add_option("", "--config-file", dest="config_file", default=None,
help="load a config file (TODO: document this option)")
app = TaurusApplication(cmd_line_parser=parser,app_name="TaurusDevicePanel",
app_version=taurus.Release.version)
args = app.get_command_line_args()
options = app.get_command_line_options()
w = TaurusDevicePanel()
w.show()
if len(args) == 0:
from taurus.qt.qtgui.panel import TaurusModelChooser
models, ok = TaurusModelChooser.modelChooserDlg(w,
selectables = [TaurusElementType.Member],
singleModel= True )
model = models[0] if ok and models else None
filters = ''
else:
model = args[0]