diff options
author | rahulp13 | 2020-07-24 01:08:02 +0530 |
---|---|---|
committer | rahulp13 | 2020-07-24 01:08:02 +0530 |
commit | c13e7b0f873e4857f1ce7924c0a72609df3ddca2 (patch) | |
tree | 119f73a57ec709c494b2c9e34cf309e2619008c7 /src/kicadtoNgspice | |
parent | 175208c2553bde875968a9bc53176b6039ba9360 (diff) | |
download | eSim-c13e7b0f873e4857f1ce7924c0a72609df3ddca2.tar.gz eSim-c13e7b0f873e4857f1ce7924c0a72609df3ddca2.tar.bz2 eSim-c13e7b0f873e4857f1ce7924c0a72609df3ddca2.zip |
platform independent library and image paths, flake8 compliant
Diffstat (limited to 'src/kicadtoNgspice')
-rw-r--r-- | src/kicadtoNgspice/DeviceModel.py | 9 | ||||
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.py | 18 | ||||
-rw-r--r-- | src/kicadtoNgspice/Processing.py | 6 | ||||
-rw-r--r-- | src/kicadtoNgspice/SubcircuitTab.py | 6 |
4 files changed, 26 insertions, 13 deletions
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index 31ff74f7..ceb89351 100644 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -364,11 +364,16 @@ class DeviceModel(QtGui.QWidget): sending_btn = self.sender() self.widgetObjCount = int(sending_btn.objectName()) + init_path = '../../' + if os.name == 'nt': + init_path = '' + self.libfile = str( QtGui.QFileDialog.getOpenFileName( self, "Open Library Directory", - "library/deviceModelLibrary", - "*.lib")) + init_path + "library/deviceModelLibrary", "*.lib" + ) + ) # Setting Library to Text Edit Line self.entry_var[self.widgetObjCount].setText(self.libfile) diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py index 6d654158..b52a4de8 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.py +++ b/src/kicadtoNgspice/KicadtoNgspice.py @@ -599,16 +599,16 @@ class MainWindow(QtGui.QWidget): tree = ET.ElementTree(attr_parent) tree.write(fw) - # Create Convert object with the source details & the schematic details - print("=============================================================") - print("SOURCE LIST TRACK") - print(self.obj_track.sourcelisttrack["ITEMS"]) - print("SOURCE ENTRY VAR") - print(self.obj_track.source_entry_var["ITEMS"]) - print("SCHEMATIC INFO") - print(store_schematicInfo) - print("=============================================================") + # print("=============================================================") + # print("SOURCE LIST TRACK") + # print(self.obj_track.sourcelisttrack["ITEMS"]) + # print("SOURCE ENTRY VAR") + # print(self.obj_track.source_entry_var["ITEMS"]) + # print("SCHEMATIC INFO") + # print(store_schematicInfo) + # print("=============================================================") + # Create Convert object with the source details & the schematic details self.obj_convert = Convert.Convert( self.obj_track.sourcelisttrack["ITEMS"], self.obj_track.source_entry_var["ITEMS"], diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py index 67ffd3f5..494c49b4 100644 --- a/src/kicadtoNgspice/Processing.py +++ b/src/kicadtoNgspice/Processing.py @@ -8,7 +8,11 @@ class PrcocessNetlist: - This class include all the function required for pre-proccessing of netlist before converting to Ngspice Netlist. """ - modelxmlDIR = 'library/modelParamXML' + init_path = '../../' + if os.name == 'nt': + init_path = '' + + modelxmlDIR = init_path + 'library/modelParamXML' def __init__(self): pass diff --git a/src/kicadtoNgspice/SubcircuitTab.py b/src/kicadtoNgspice/SubcircuitTab.py index d68cb97e..f4b759c5 100644 --- a/src/kicadtoNgspice/SubcircuitTab.py +++ b/src/kicadtoNgspice/SubcircuitTab.py @@ -146,10 +146,14 @@ class SubcircuitTab(QtGui.QWidget): # print "Object Called is ",sending_btn.objectName() self.widgetObjCount = int(sending_btn.objectName()) + init_path = '../../' + if os.name == 'nt': + init_path = '' + self.subfile = str( QtGui.QFileDialog.getExistingDirectory( self, "Open Subcircuit", - "library/SubcircuitLibrary") + init_path + "library/SubcircuitLibrary") ) self.reply = self.obj_validation.validateSub( self.subfile, self.numPorts[self.widgetObjCount - 1]) |