summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation/NgspiceWidget.py
diff options
context:
space:
mode:
authormaddy-22019-05-27 12:32:49 +0530
committernilshah982019-06-07 11:03:14 +0530
commit28d8fd378bf717e8daba8a564708856769f24b98 (patch)
treeee8cc6592c690708d5f35cb5304feeae3d014c97 /src/ngspiceSimulation/NgspiceWidget.py
parent7e7b6d372aac718f857fcad5c49faf019ff83bb4 (diff)
downloadeSim-28d8fd378bf717e8daba8a564708856769f24b98.tar.gz
eSim-28d8fd378bf717e8daba8a564708856769f24b98.tar.bz2
eSim-28d8fd378bf717e8daba8a564708856769f24b98.zip
initialise pep8 compliance, using autopep8
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index b5645808..1d19199e 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -1,13 +1,15 @@
-from PyQt4 import QtGui,QtCore
+from PyQt4 import QtGui, QtCore
from configuration.Appconfig import Appconfig
import platform
import os
+
class NgspiceWidget(QtGui.QWidget):
"""
This Class creates NgSpice Window
"""
- def __init__(self,command,projPath):
+
+ def __init__(self, command, projPath):
QtGui.QWidget.__init__(self)
self.obj_appconfig = Appconfig()
self.process = QtCore.QProcess(self)
@@ -15,21 +17,22 @@ class NgspiceWidget(QtGui.QWidget):
self.layout = QtGui.QVBoxLayout(self)
self.layout.addWidget(self.terminal)
- print("Argument to ngspice command : ",command)
+ print("Argument to ngspice command : ", command)
if platform.system() == 'Linux':
- self.command = "cd "+projPath+";ngspice "+command
- #Creating argument for process
+ self.command = "cd " + projPath + ";ngspice " + command
+ # Creating argument for process
#self.args = ['-into', str(self.terminal.winId()),'-hold','-e', self.command]
- self.args = ['-hold','-e', self.command]
+ self.args = ['-hold', '-e', self.command]
self.process.start('xterm', self.args)
self.obj_appconfig.process_obj.append(self.process)
- self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']].append(self.process.pid())
+ self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']].append(
+ self.process.pid())
elif platform.system() == 'Windows':
- tempdir= os.getcwd()
+ tempdir = os.getcwd()
projPath = self.obj_appconfig.current_project["ProjectName"]
os.chdir(projPath)
- self.command = "ngspice "+command
+ self.command = "ngspice " + command
self.process.start(self.command)
os.chdir(tempdir)