summaryrefslogtreecommitdiff
path: root/src/ngspice_ghdl.py
diff options
context:
space:
mode:
authorrahulp132020-02-11 00:20:41 +0530
committerrahulp132020-02-11 00:20:41 +0530
commit4245ac1c7a4ef6a4e650ab666327210f2c812e3e (patch)
tree48a3b78ecf0a80f036a265a61242eff5a75ab061 /src/ngspice_ghdl.py
parent28bdf8d26cc422e27a52f33155555db877d07c6e (diff)
downloadnghdl-4245ac1c7a4ef6a4e650ab666327210f2c812e3e.tar.gz
nghdl-4245ac1c7a4ef6a4e650ab666327210f2c812e3e.tar.bz2
nghdl-4245ac1c7a4ef6a4e650ab666327210f2c812e3e.zip
pep8 compliant
Diffstat (limited to 'src/ngspice_ghdl.py')
-rwxr-xr-xsrc/ngspice_ghdl.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ngspice_ghdl.py b/src/ngspice_ghdl.py
index 0760ede..8fc5549 100755
--- a/src/ngspice_ghdl.py
+++ b/src/ngspice_ghdl.py
@@ -151,7 +151,7 @@ class Mainwindow(QtGui.QWidget):
print("Exiting application")
quit()
else:
- print("Creating model "+self.modelname+" directory")
+ print("Creating model " + self.modelname + " directory")
os.mkdir(self.modelname)
def addingModelInModpath(self):
@@ -159,15 +159,13 @@ class Mainwindow(QtGui.QWidget):
" in Modpath file " + self.digital_home)
# Adding name of model in the modpath file
# Check if the string is already in the file
- with open(self.digital_home + "/modpath.lst", 'a+') as f:
+ with open(self.digital_home + "/modpath.lst", 'r+') as f:
flag = 0
for line in f:
if line.strip() == self.modelname:
print("Found model "+self.modelname+" in the modpath.lst")
flag = 1
break
- else:
- pass
if flag == 0:
print("Adding model name "+self.modelname+" into modpath.lst")
@@ -229,8 +227,7 @@ class Mainwindow(QtGui.QWidget):
@QtCore.pyqtSlot()
def readAllStandard(self):
self.termedit.append(
- str(self.process.readAllStandardOutput().data(),
- encoding='utf-8')
+ str(self.process.readAllStandardOutput().data(), encoding='utf-8')
)
stderror = self.process.readAllStandardError()
if stderror.toUpper().contains("ERROR"):