blob: 51e411444c89709845d151f393b640b1ef814dbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
from PyQt4 import QtGui,QtCore
class NgspiceWidget(QtGui.QWidget):
"""
This Class creates NgSpice Window
"""
def __init__(self,command):
QtGui.QWidget.__init__(self)
self.command = "ngspice "+command
self.process = QtCore.QProcess(self)
self.terminal = QtGui.QWidget(self)
self.layout = QtGui.QVBoxLayout(self)
self.layout.addWidget(self.terminal)
#Creating argument for process
self.args = ['-into', str(self.terminal.winId()),'-e', self.command]
self.process.start('xterm', self.args)
|