diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kicadtoNgspice/Analysis.py | 9 | ||||
-rw-r--r-- | src/kicadtoNgspice/DeviceModel.py | 3 | ||||
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.py | 3 | ||||
-rw-r--r-- | src/kicadtoNgspice/Model.py | 3 | ||||
-rw-r--r-- | src/kicadtoNgspice/Source.py | 3 |
5 files changed, 7 insertions, 14 deletions
diff --git a/src/kicadtoNgspice/Analysis.py b/src/kicadtoNgspice/Analysis.py index 7ac430c4..7c237dde 100644 --- a/src/kicadtoNgspice/Analysis.py +++ b/src/kicadtoNgspice/Analysis.py @@ -88,8 +88,7 @@ class Analysis(QtGui.QWidget): def createACgroup(self): kicadFile = sys.argv[1] (projpath,filename)=os.path.split(kicadFile) - project_name=projpath.split("/") - project_name=project_name[len(project_name)-1] + project_name=os.path.basename(projpath) print "PROJECT NAME---------",project_name check=1 try: @@ -229,8 +228,7 @@ class Analysis(QtGui.QWidget): def createDCgroup(self): kicadFile = sys.argv[1] (projpath,filename)=os.path.split(kicadFile) - project_name=projpath.split("/") - project_name=project_name[len(project_name)-1] + project_name=os.path.basename(projpath) print "PROJECT NAME---------",project_name check=1 try: @@ -374,8 +372,7 @@ class Analysis(QtGui.QWidget): def createTRANgroup(self): kicadFile = sys.argv[1] (projpath,filename)=os.path.split(kicadFile) - project_name=projpath.split("/") - project_name=project_name[len(project_name)-1] + project_name=os.path.basename(projpath) print "PROJECT NAME---------",project_name check=1 try: diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index 56ffb7f1..a6d11ee7 100644 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -16,8 +16,7 @@ class DeviceModel(QtGui.QWidget): kicadFile = sys.argv[1] (projpath,filename)=os.path.split(kicadFile) - project_name=projpath.split("/") - project_name=project_name[len(project_name)-1] + project_name=os.path.basename(projpath) print "PROJECT NAME---------",project_name check=1 try: diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py index 4677c20d..cf70eab9 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.py +++ b/src/kicadtoNgspice/KicadtoNgspice.py @@ -133,8 +133,7 @@ class MainWindow(QtGui.QWidget): global analysisoutput kicadFile = sys.argv[1] (projpath,filename)=os.path.split(kicadFile) - project_name=projpath.split("/") - project_name=project_name[len(project_name)-1] + project_name=os.path.basename(projpath) print "PROJ PATH---",projpath diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py index 8170f056..984c47f0 100644 --- a/src/kicadtoNgspice/Model.py +++ b/src/kicadtoNgspice/Model.py @@ -18,8 +18,7 @@ class Model(QtGui.QWidget): kicadFile = sys.argv[1] (projpath,filename)=os.path.split(kicadFile) - project_name=projpath.split("/") - project_name=project_name[len(project_name)-1] + project_name=os.path.basename(projpath) #print "PROJECT NAME---------",project_name check=1 try: diff --git a/src/kicadtoNgspice/Source.py b/src/kicadtoNgspice/Source.py index ef4db1cc..e0d0fe19 100644 --- a/src/kicadtoNgspice/Source.py +++ b/src/kicadtoNgspice/Source.py @@ -34,8 +34,7 @@ class Source(QtGui.QWidget): """ kicadFile = sys.argv[1] (projpath,filename)=os.path.split(kicadFile) - project_name=projpath.split("/") - project_name=project_name[len(project_name)-1] + project_name=os.path.basename(projpath) print "PROJECT NAME---------",project_name check=1 try: |