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/DeviceModel.py | |
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/DeviceModel.py')
-rw-r--r-- | src/kicadtoNgspice/DeviceModel.py | 9 |
1 files changed, 7 insertions, 2 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) |