summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation/NgspiceWidget.py
diff options
context:
space:
mode:
authorSunil Shetye2019-06-13 13:11:14 +0530
committerGitHub2019-06-13 13:11:14 +0530
commitcfc34bb19977e738582620802415ccde27a03039 (patch)
treedaaace10133835956619b401aca9c252e3e789bc /src/ngspiceSimulation/NgspiceWidget.py
parent25c6eddcea3c8a62d9750a78435454544d8c7b14 (diff)
parent20b23a7934f7cf01cd5b4353ddd2e008b40e5ffd (diff)
downloadeSim-cfc34bb19977e738582620802415ccde27a03039.tar.gz
eSim-cfc34bb19977e738582620802415ccde27a03039.tar.bz2
eSim-cfc34bb19977e738582620802415ccde27a03039.zip
Merge pull request #86 from nilshah98/documentation
Documentation added and minor fixes
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index 52427681..def1d4e9 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -4,9 +4,11 @@ import platform
import os
+# This Class creates NgSpice Window
class NgspiceWidget(QtGui.QWidget):
"""
- This Class creates NgSpice Window
+ Includes functions that checks whether OS is linux or windows
+ and creates NgSpice window accordingly.
"""
def __init__(self, command, projPath):
@@ -18,21 +20,21 @@ class NgspiceWidget(QtGui.QWidget):
self.layout.addWidget(self.terminal)
print("Argument to ngspice command : ", command)
-
+ # For Linux OS
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.args = ['-hold', '-e', self.command]
self.process.start('xterm', self.args)
self.obj_appconfig.process_obj.append(self.process)
+ print(self.obj_appconfig.proc_dict)
(
self.obj_appconfig.proc_dict
[self.obj_appconfig.current_project['ProjectName']].append(
self.process.pid())
)
+ # For Windows OS
elif platform.system() == 'Windows':
tempdir = os.getcwd()
projPath = self.obj_appconfig.current_project["ProjectName"]