From e383c8b9dd13465dc8b7cad2586e1db829845ff8 Mon Sep 17 00:00:00 2001 From: Fahim Date: Wed, 21 Oct 2015 16:58:26 +0530 Subject: Subject: OpenModelica- Added comma in parameter line Description: OpenModelica- Added comma in parameter line to separate each parameter with comma --- src/ngspicetoModelica/NgspicetoModelica.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py index 3cb7a8a6..3b1752d3 100644 --- a/src/ngspicetoModelica/NgspicetoModelica.py +++ b/src/ngspicetoModelica/NgspicetoModelica.py @@ -117,9 +117,15 @@ class NgMoConverter: modelicaParam = [] for eachline in paramInfo: eachline = eachline.split('.param') - stat = 'parameter Real ' + eachline[1] + ';' + #Include ',' in between parameter + #Removing leading and trailing space + line = eachline[1].strip() + line = line.split() + final_line = ','.join(line) + stat = 'parameter Real ' + final_line + ';' stat = stat.translate(maketrans('{}', ' ')) modelicaParam.append(stat) + print "Modelica Parameter----------->",modelicaParam return modelicaParam -- cgit