summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornilshah982019-06-07 18:06:05 +0530
committernilshah982019-06-13 12:15:50 +0530
commit1970530f0818577ef6fb1b2018d76829195c87e9 (patch)
tree667f63f752b4f85730a9ea3b8bcc368ccaf82d73 /src
parentd620109c1255aa4af35aa8f86f0e147b709d9b9c (diff)
downloadeSim-1970530f0818577ef6fb1b2018d76829195c87e9.tar.gz
eSim-1970530f0818577ef6fb1b2018d76829195c87e9.tar.bz2
eSim-1970530f0818577ef6fb1b2018d76829195c87e9.zip
python calls updated to python3 calls
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontEnd/Application.py46
-rw-r--r--src/ngspicetoModelica/ModelicaUI.py2
-rw-r--r--src/ngspicetoModelica/NgspicetoModelica.py2
-rw-r--r--src/projManagement/Kicad.py2
4 files changed, 49 insertions, 3 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index b440902f..c2790a80 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -408,6 +408,52 @@ class Application(QtGui.QMainWindow):
self.projDir, self.projName + ".cir.out")
self.modelicaNetlist = os.path.join(
self.projDir, self.projName + ".mo")
+
+ """
+ try:
+ # Creating a command for Ngspice to Modelica converter
+ self.cmd1 = "
+ python3 ../ngspicetoModelica/NgspicetoModelica.py "\
+ +self.ngspiceNetlist
+ self.obj_workThread1 = Worker.WorkerThread(self.cmd1)
+ self.obj_workThread1.start()
+
+
+ if self.obj_validation.validateTool("OMEdit"):
+ # Creating command to run OMEdit
+ self.cmd2 = "OMEdit "+self.modelicaNetlist
+ self.obj_workThread2 = Worker.WorkerThread(self.cmd2)
+ self.obj_workThread2.start()
+ else:
+ self.msg = QtGui.QMessageBox()
+ self.msgContent = "There was an error while
+ opening OMEdit.<br/>\
+ Please make sure OpenModelica is installed in your\
+ system. <br/>\
+ To install it on Linux : Go to\
+ <a href=https://www.openmodelica.org/download/\
+ download-linux>OpenModelica Linux</a> and \
+ install nigthly build release.<br/>\
+ To install it on Windows : Go to\
+ <a href=https://www.openmodelica.org/download/\
+ download-windows>OpenModelica Windows</a>\
+ and install latest version.<br/>"
+ self.msg.setTextFormat(QtCore.Qt.RichText)
+ self.msg.setText(self.msgContent)
+ self.msg.setWindowTitle("Missing OpenModelica")
+ self.obj_appconfig.print_info(self.msgContent)
+ self.msg.exec_()
+
+ except Exception as e:
+ self.msg = QtGui.QErrorMessage()
+ self.msg.showMessage(
+ 'Unable to convert NgSpice netlist to\
+ Modelica netlist :'+str(e))
+ self.msg.setWindowTitle(
+ "Ngspice to Modelica conversion error")
+ self.obj_appconfig.print_error(str(e))
+ """
+
self.obj_Mainview.obj_dockarea.modelicaEditor(self.projDir)
else:
diff --git a/src/ngspicetoModelica/ModelicaUI.py b/src/ngspicetoModelica/ModelicaUI.py
index daef6e76..1d860fb7 100644
--- a/src/ngspicetoModelica/ModelicaUI.py
+++ b/src/ngspicetoModelica/ModelicaUI.py
@@ -52,7 +52,7 @@ class OpenModelicaEditor(QtGui.QWidget):
def callConverter(self):
try:
- self.cmd1 = "python ../ngspicetoModelica/NgspicetoModelica.py " + \
+ self.cmd1 = "python3 ../ngspicetoModelica/NgspicetoModelica.py " + \
self.ngspiceNetlist + ' ' + self.map_json
# self.obj_workThread1 = Worker.WorkerThread(self.cmd1)
# self.obj_workThread1.start()
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py
index dfeafb53..007c5a74 100644
--- a/src/ngspicetoModelica/NgspicetoModelica.py
+++ b/src/ngspicetoModelica/NgspicetoModelica.py
@@ -1268,7 +1268,7 @@ def main(args):
map_json = sys.argv[2]
else:
print("USAGE:")
- print("python NgspicetoModelica.py <filename>")
+ print("python3 NgspicetoModelica.py <filename>")
sys.exit()
dir_name = os.path.dirname(os.path.realpath(filename))
diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py
index d8c413c3..8b20112e 100644
--- a/src/projManagement/Kicad.py
+++ b/src/projManagement/Kicad.py
@@ -180,7 +180,7 @@ class Kicad:
# Creating a command to run
"""
- self.cmd = ("python ../kicadtoNgspice/KicadtoNgspice.py "
+ self.cmd = ("python3 ../kicadtoNgspice/KicadtoNgspice.py "
+ "self.project+".cir ")
self.obj_workThread = Worker.WorkerThread(self.cmd)
self.obj_workThread.start()