summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Convert.py
diff options
context:
space:
mode:
authorSunil Shetye2019-06-13 13:11:14 +0530
committerGitHub2019-06-13 13:11:14 +0530
commitcfc34bb19977e738582620802415ccde27a03039 (patch)
treedaaace10133835956619b401aca9c252e3e789bc /src/kicadtoNgspice/Convert.py
parent25c6eddcea3c8a62d9750a78435454544d8c7b14 (diff)
parent20b23a7934f7cf01cd5b4353ddd2e008b40e5ffd (diff)
downloadeSim-cfc34bb19977e738582620802415ccde27a03039.tar.gz
eSim-cfc34bb19977e738582620802415ccde27a03039.tar.bz2
eSim-cfc34bb19977e738582620802415ccde27a03039.zip
Merge pull request #86 from nilshah98/documentation
Documentation added and minor fixes
Diffstat (limited to 'src/kicadtoNgspice/Convert.py')
-rw-r--r--src/kicadtoNgspice/Convert.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index 38234fed..76b6ba57 100644
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -8,7 +8,7 @@ from xml.etree import ElementTree as ET
class Convert:
"""
- This class has all the necessary function required to convert
+ - This class has all the necessary function required to convert
kicad netlist to ngspice netlist.
"""
@@ -22,7 +22,7 @@ class Convert:
def addSourceParameter(self):
"""
- This function add the source details to schematicInfo
+ - This function add the source details to schematicInfo
"""
self.start = 0
@@ -39,7 +39,7 @@ class Convert:
str(self.entry_var[self.start].text())) > 0 else '0'
va_val = str(
self.entry_var[self.start + 1].text()
- ) if len(
+ ) if len(
str(self.entry_var[self.start + 1].text())) \
> 0 else '0'
freq_val = str(self.entry_var[self.start + 2].text()) \
@@ -205,6 +205,8 @@ class Convert:
self.direct = self.clarg1
(filepath, filemname) = os.path.split(self.direct)
self.Fileopen = os.path.join(filepath, "analysis")
+ print("======================================================")
+ print("FILEOPEN CONVERT ANALYS", self.Fileopen)
self.writefile = open(self.Fileopen, "w")
if self.variable == 'AC':
self.no = 0
@@ -440,7 +442,10 @@ class Convert:
param = key
default = 0
# Cheking if value is iterable.its for vector
- if hasattr(value, '__iter__'):
+ if (
+ type(value) is not str and
+ hasattr(value, '__iter__')
+ ):
addmodelLine += param + "=["
for lineVar in value:
if str(