diff options
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]) |