示例#1
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.set_icon()
        self.ui = Ui_ProcExplorer.Ui_ProcExplorer()
        self.ui.setupUi(self)
        self.ses = madre.ses()
        self.tabs = {}
        self.ui.bScan.clicked.connect(self.do_scan)
        self.ui.bStartStop.clicked.connect(self.toggle_trace)
        self.postproc = []

        self.ui.bSignal.addActions([
            self.ui.actionSigKill,
            self.ui.actionSigAbort,
            self.ui.actionSigSegv
            ])
    
        def sigkill():
            self.send_signal(9)
        def sigabort():
            self.send_signal(6)
        def sigsegv():
            self.send_signal(11)
            
        self.ui.actionSigAbort.triggered.connect(sigabort)
        self.ui.actionSigKill.triggered.connect(sigkill)
        self.ui.actionSigSegv.triggered.connect(sigsegv)
        
        self.trace_enabled = False
        self._pidof = None
示例#2
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.set_icon()
        self.ui = Ui_ProcExplorer.Ui_ProcExplorer()
        self.ui.setupUi(self)
        self.ses = madre.ses()
        self.tabs = {}
        self.ui.bScan.clicked.connect(self.do_scan)
        self.ui.bStartStop.clicked.connect(self.toggle_trace)
        self.postproc = []

        self.ui.bSignal.addActions([
            self.ui.actionSigKill, self.ui.actionSigAbort,
            self.ui.actionSigSegv
        ])

        def sigkill():
            self.send_signal(9)

        def sigabort():
            self.send_signal(6)

        def sigsegv():
            self.send_signal(11)

        self.ui.actionSigAbort.triggered.connect(sigabort)
        self.ui.actionSigKill.triggered.connect(sigkill)
        self.ui.actionSigSegv.triggered.connect(sigsegv)

        self.trace_enabled = False
        self._pidof = None
示例#3
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_ProcList.Ui_ProcList()
     self.ui.setupUi(self)
     self.ses = madre.ses()
     t = self.ui.tableWidget
     t.setSortingEnabled(True)
     self.ui.bRefresh.clicked.connect(self.refresh)
     self.ui.bKill.clicked.connect(self.kill)
示例#4
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_ProcList.Ui_ProcList()
     self.ui.setupUi(self)
     self.ses = madre.ses()
     t = self.ui.tableWidget
     t.setSortingEnabled(True)
     self.ui.bRefresh.clicked.connect(self.refresh)
     self.ui.bKill.clicked.connect(self.kill)
示例#5
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_DynViewer.Ui_DynViewer()
     self.ui.setupUi(self)
     self.ses = madre.ses()
     self.ui.textBrowser.anchorClicked.connect(self.anchor_clicked)
     self.ui.textBrowser.setOpenLinks(False)
     self.pagestack = []
     self.currentpage = None
     self.ui.bBack.clicked.connect(self.go_back)
示例#6
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_DynViewer.Ui_DynViewer()
     self.ui.setupUi(self)
     self.ses = madre.ses()
     self.ui.textBrowser.anchorClicked.connect(self.anchor_clicked)
     self.ui.textBrowser.setOpenLinks(False)
     self.pagestack = []
     self.currentpage = None
     self.ui.bBack.clicked.connect(self.go_back)
示例#7
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_TraceViewer.Ui_TraceViewer()
     self.ui.setupUi(self)
     self.ses = madre.ses()
         
     self.ui.btnRefresh.clicked.connect(self.refresh)
     self.ui.bExternal.clicked.connect(self.external_editor)
     self.state = None
     self.trace = None
示例#8
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Beamer.Ui_Beamer()
     self.ui.setupUi(self)
     self.setAcceptDrops(True)
     self.ses = madre.ses()
     self.set_icon()
     
     self.inbox = self.ses.rootdir() + "/inbox"
     self.outbox = self.ses.rootdir() + "/outbox"
     self.ses.ex('mkdir -p ' + self.inbox)
     self.ui.bFetchOutbox.clicked.connect(self.fetch_outbox)
     self.ui.bDropClipboard.clicked.connect(self.drop_clipboard)
     self.cb = QtGui.QApplication.clipboard()
示例#9
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self.logViewer = logviewer.LogViewer()
        self.logViewer.show()

        self.ses = madre.ses()
        self.ui = Ui_ProcLauncher.Ui_ProcLauncher()
        self.ui.setupUi(self)
        self.parse_config()
        self.connected = False

        self.ui.bReconnect.clicked.connect(self.try_connect)
        #self.try_connect()

        self.ui.bFindExec.clicked.connect(self.find_app)
        self.ui.comboSelectedDevice.currentIndexChanged.connect(
            self.select_device)
        #print "root"
        #print self.ses.ex_root("pwd")
        tools = self.get_tools()
        cols = 3
        for (i, (title, func)) in enumerate(tools):
            b = QtGui.QPushButton(self.ui.centralwidget)
            b.setText(title)
            self.ui.procLayout.addWidget(b, i / cols, i % cols)
            b.clicked.connect(func)

        tools = self.get_device_tools()
        for (i, (title, func)) in enumerate(tools):
            b = QtGui.QPushButton(self.ui.centralwidget)
            b.setText(title)
            self.ui.deviceLayout.addWidget(b, i / cols, i % cols)
            b.clicked.connect(func)

        self.ui.inpProcName.setText("/bin/ls")
        self.add_actions()
        self.procs = []
        # explorer instances
        self.exps = []
        self.pl = None
        self.dv = None
        self.beamer = None
        self.oprofile = None
        cdir = cachedir()
        if not os.path.isdir(cdir):
            os.makedirs(cdir)
        self.set_icon()
示例#10
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        
        self.logViewer = logviewer.LogViewer()
        self.logViewer.show()
        
        self.ses = madre.ses()
        self.ui = Ui_ProcLauncher.Ui_ProcLauncher()
        self.ui.setupUi(self)
        self.parse_config()
        self.connected = False
        
        self.ui.bReconnect.clicked.connect(self.try_connect)
        #self.try_connect()
        
        self.ui.bFindExec.clicked.connect(self.find_app)
        self.ui.comboSelectedDevice.currentIndexChanged.connect(self.select_device)
        #print "root"
        #print self.ses.ex_root("pwd")
        tools = self.get_tools()
        cols = 3
        for (i, (title, func)) in enumerate(tools):
            b = QtGui.QPushButton(self.ui.centralwidget)
            b.setText(title)
            self.ui.procLayout.addWidget(b,i/cols, i % cols)
            b.clicked.connect(func)

        tools = self.get_device_tools()
        for (i,(title, func)) in enumerate(tools):
            b = QtGui.QPushButton(self.ui.centralwidget)
            b.setText(title)
            self.ui.deviceLayout.addWidget(b, i/cols, i% cols)
            b.clicked.connect(func)
                    
        self.ui.inpProcName.setText("/bin/ls")
        self.add_actions()
        self.procs = []
        # explorer instances
        self.exps = []
        self.pl = None
        self.dv = None
        self.beamer = None
        self.oprofile = None
        cdir = cachedir()
        if not os.path.isdir(cdir):
            os.makedirs(cdir)
        self.set_icon()
示例#11
0
文件: rtop.py 项目: vivainio/Cardinal
#!/usr/bin/env python


""" test for threadutil 'repeater' """

from PyQt4 import QtCore

import madre, sys

import threadutil

ses = madre.ses()

ses.connect()

from threadutil import Repeater


def main():
    app = QtCore.QCoreApplication(sys.argv)
    ch = ses.invoke_shell("ls")
    print ch
    # print `r.ex("ls")`

    ch.send("top\n")

    def f():
        print "call"
        return ch.recv(1000)

    rep = Repeater(f)
示例#12
0
#!/usr/bin/env python

from PyQt4 import QtGui
import sys,os

import logging
log = logging.getLogger("devicesetup")

import madre

import crdconfig


ses = madre.ses()

def setup_logging():

    # Log everything, and send it to stderr.
    logging.basicConfig(level=logging.DEBUG)
    pm = logging.getLogger("paramiko.transport")
    pm.setLevel(logging.INFO)

class SetupWiz(QtGui.QWizard):
    def __init__(self, parent = None):
        QtGui.QWizard.__init__(self, parent)
        self.cfg = crdconfig.parse_config()
        self.host = self.cfg['host']
        self.user = self.cfg['user']
        ses.user = self.user
        ses.host = self.host