summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation/NgspiceWidget.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index 8114f56d..8c63a22a 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -23,24 +23,25 @@ class NgspiceWidget(QtWidgets.QWidget):
print("Argument to ngspice command : ", command)
if os.name == 'nt': # For Windows OS
- home = os.path.expanduser("~")
-
parser_nghdl = ConfigParser()
- parser_nghdl.read(os.path.join(
- home, os.path.join('.nghdl', 'config.ini')))
+ parser_nghdl.read(
+ os.path.join('library', 'config', '.nghdl', 'config.ini')
+ )
- msys_bin = parser_nghdl.get('COMPILER', 'MSYS_HOME')
+ msys_home = parser_nghdl.get('COMPILER', 'MSYS_HOME')
tempdir = os.getcwd()
projPath = self.obj_appconfig.current_project["ProjectName"]
os.chdir(projPath)
self.command = 'cmd /c '+'"start /min ' + \
- msys_bin + "/mintty.exe ngspice -p " + command + '"'
+ msys_home + "/usr/bin/mintty.exe ngspice -p " + command + '"'
self.process.start(self.command)
os.chdir(tempdir)
else: # For Linux OS
- self.command = "cd " + projPath + ";ngspice " + command
+ self.command = "cd " + projPath + \
+ ";ngspice -r " + command.replace(".cir.out", ".raw") + \
+ " " + command
# Creating argument for process
self.args = ['-hold', '-e', self.command]
self.process.start('xterm', self.args)
@@ -51,3 +52,7 @@ class NgspiceWidget(QtWidgets.QWidget):
[self.obj_appconfig.current_project['ProjectName']].append(
self.process.pid())
)
+ self.process = QtCore.QProcess(self)
+ self.command = "gaw " + command.replace(".cir.out", ".raw")
+ self.process.start('sh', ['-c', self.command])
+ print(self.command)