diff options
Diffstat (limited to 'src/kicadtoNgspice/Convert.py')
-rw-r--r-- | src/kicadtoNgspice/Convert.py | 13 |
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( |