Ejemplo n.º 1
0
 def new_terminal(self):
     term = TerminalWidget(self)
     term.session_closed.connect(self._on_session_closed)
     self.addTab(term, "Terminal")
     self._terms.append(term)
     self.setCurrentWidget(term)
     term.setFocus()
Ejemplo n.º 2
0
 def new_terminal(self):
     term = TerminalWidget(self)
     term.session_closed.connect(self._on_session_closed)
     self.addTab(term, "Terminal")
     self._terms.append(term)
     self.setCurrentWidget(term)
     term.setFocus()
Ejemplo n.º 3
0
 def new_terminal(self):
     files.write('/proc/info/su', self.Env.username)
     term = TerminalWidget(self)
     term.session_closed.connect(self._on_session_closed)
     self.addTab(term, res.get('@string/app_name'))
     self._terms.append(term)
     self.setCurrentWidget(term)
     term.setFocus()
Ejemplo n.º 4
0
 def new_terminal(self):
     term = TerminalWidget(self,
                           command="/usr/bin/zsh",
                           font_name="Dejavu Sans Mono Bold",
                           font_size=25)
     term.session_closed.connect(self._on_session_closed)
     self.addTab(term, "Terminal")
     self._terms.append(term)
     self.setCurrentWidget(term)
     term.setFocus()
Ejemplo n.º 5
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PyQt4.QtGui import QApplication

from pyqterm import TerminalWidget


if __name__ == "__main__":
    import signal
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    app = QApplication(sys.argv)
    win = TerminalWidget()
    win.show()
    app.exec_()

Ejemplo n.º 6
0
 def new_terminal(self):
     term = TerminalWidget(self)
     term.session_closed.connect(self._on_session_closed)
     self.addTab(term, "Terminal")
     self._terms.append(term)
     self.setCurrentWidget(term)
     term.setFocus()
     self.terminal = term
     filename = str(self.gdbparams[2])
     print filename
     extension = os.path.splitext(filename)[1]
     print extension
     if extension == ".lzo":
        print "the core is lzo"
        call(["lzop", "-fd", filename, "-o","test.core"])
    
     
     term.send("rm -f bt.txt \n")
     gdbpath = str("/usr/bin/mips-csr3.0-gdb -x bt.txt") + str(" \n")  
     #gdbpath = str(self.gdbparams[0]) + "/usr/bin/gdb "
     print gdbpath
     #cmd = str(gdbpath + str(self.gdbparams[1]) + " test.core \n")
     #print cmd
     ## start gdb 
     term.send(gdbpath)
     term.send("set logging on bt.txt \n")
     solibpathcmd = str("set solib-absolute-prefix ") + str(self.gdbparams[0]) + str(" \n")
     term.send(solibpathcmd)
     sysrootpathcmd = str("set sysroot ") + str(self.gdbparams[0]) + str(" \n")
     term.send(sysrootpathcmd)
     filepathcmd = str("file ") + str(self.gdbparams[1]) + str(" \n")
     term.send(filepathcmd)
     corefilecmd = str("core-file ") + "test.core" + str(" \n")
     term.send(corefilecmd)
     #term.send(cmd)
     term.send("bt full  \n")
     msgBox = QMessageBox()
     workingDir = os.getcwd() 
     btMsg = str("Check the backtrace stored in bt.txt at ") + str(workingDir) 
     msgBox.setText(btMsg)
     msgBox.setStandardButtons(QMessageBox.Ok)
     ret = msgBox.exec_();
Ejemplo n.º 7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PyQt4.QtGui import QApplication

from pyqterm import TerminalWidget

if __name__ == "__main__":
    import signal
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    app = QApplication(sys.argv)
    win = TerminalWidget()
    win.show()
    app.exec_()
Ejemplo n.º 8
0
    def new_terminal(self):
        term = TerminalWidget(self)
        term.session_closed.connect(self._on_session_closed)
        self.addTab(term, "Terminal")
        self._terms.append(term)
        self.setCurrentWidget(term)
        term.setFocus()
        self.terminal = term
        filename = str(self.gdbparams[2])
        print filename
        extension = os.path.splitext(filename)[1]
        print extension
        if extension == ".lzo":
            print "the core is lzo"
            call(["lzop", "-fd", filename, "-o", "test.core"])

        term.send("rm -f bt.txt \n")
        gdbpath = str("/usr/bin/mips-csr3.0-gdb -x bt.txt") + str(" \n")
        #gdbpath = str(self.gdbparams[0]) + "/usr/bin/gdb "
        print gdbpath
        #cmd = str(gdbpath + str(self.gdbparams[1]) + " test.core \n")
        #print cmd
        ## start gdb
        term.send(gdbpath)
        term.send("set logging on bt.txt \n")
        solibpathcmd = str("set solib-absolute-prefix ") + str(
            self.gdbparams[0]) + str(" \n")
        term.send(solibpathcmd)
        sysrootpathcmd = str("set sysroot ") + str(
            self.gdbparams[0]) + str(" \n")
        term.send(sysrootpathcmd)
        filepathcmd = str("file ") + str(self.gdbparams[1]) + str(" \n")
        term.send(filepathcmd)
        corefilecmd = str("core-file ") + "test.core" + str(" \n")
        term.send(corefilecmd)
        #term.send(cmd)
        term.send("bt full  \n")
        msgBox = QMessageBox()
        workingDir = os.getcwd()
        btMsg = str("Check the backtrace stored in bt.txt at ") + str(
            workingDir)
        msgBox.setText(btMsg)
        msgBox.setStandardButtons(QMessageBox.Ok)
        ret = msgBox.exec_()