Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/modelEditor/ModelEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def __init__(self):
def opennew(self):
self.addbtn.setHidden(True)
try:
self.removebtn.setHidden(True)
self.modeltable.setHidden(True)
except:
pass
Expand Down Expand Up @@ -230,8 +231,12 @@ def openedit(self):
self.igbt.setDisabled(True)
self.bjt.setDisabled(True)
self.magnetic.setDisabled(True)
self.editfile=str(QtGui.QFileDialog.getOpenFileName(self,"Open Library Directory","../deviceModelLibrary","*.lib"))
self.createtable(self.editfile)
try:
self.editfile=str(QtGui.QFileDialog.getOpenFileName(self,"Open Library Directory","../deviceModelLibrary","*.lib"))
self.createtable(self.editfile)
except:
print"no file selected"
pass

'''Creates the model table by parsing th .xml file '''
def createtable(self, modelfile):
Expand Down
29 changes: 17 additions & 12 deletions src/ngspiceSimulation/NgspiceWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from PyQt4 import QtGui,QtCore
from configuration.Appconfig import Appconfig
import platform
import platform
import os

class NgspiceWidget(QtGui.QWidget):
"""
Expand All @@ -13,15 +14,19 @@ def __init__(self,command,projPath):
self.terminal = QtGui.QWidget(self)
self.layout = QtGui.QVBoxLayout(self)
self.layout.addWidget(self.terminal)
print"command-------->", command
if platform.system() == 'Linux':
self.command = "cd "+projPath+";ngspice "+command
#Creating argument for process
self.args = ['-into', str(self.terminal.winId()),'-hold','-e', self.command]
self.process.start('xterm', self.args)

elif platform.system() == 'Windows':
self.command = "ngspice "+command
self.process.start(self.command)

print"command-------->", command
if platform.system() == 'Linux':
self.command = "cd "+projPath+";ngspice "+command
#Creating argument for process
self.args = ['-into', str(self.terminal.winId()),'-hold','-e', self.command]
self.process.start('xterm', self.args)

elif platform.system() == 'Windows':
tempdir= os.getcwd()
projPath = self.obj_appconfig.current_project["ProjectName"]
os.chdir(projPath)
self.command = "ngspice "+command
self.process.start(self.command)
os.chdir(tempdir)