summaryrefslogtreecommitdiff
path: root/src/ngspicetoModelica/NgspicetoModelica.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngspicetoModelica/NgspicetoModelica.py')
-rw-r--r--src/ngspicetoModelica/NgspicetoModelica.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py
index ad5f703a..058a2442 100644
--- a/src/ngspicetoModelica/NgspicetoModelica.py
+++ b/src/ngspicetoModelica/NgspicetoModelica.py
@@ -910,11 +910,12 @@ class NgMoConverter:
#print "modelicaSubParamNew----------------->",modelicaSubParamNew
connSubInfo = self.connectInfo(subSchemInfo, nodeSub, nodeDicSub, numNodesSubsub,subcktName)
#print "connSubInfo----------------->",connSubInfo
- newname = filename.split('.')
+ newname = basename.split('.')
newfilename = newname[0]
outfilename = newfilename+ ".mo"
+ outfilename = os.path.join(dir_name, outfilename)
out = open(outfilename,"w")
- out.writelines('model ' + os.path.basename(newfilename))
+ out.writelines('model ' + newfilename)
out.writelines('\n')
if IfMOSsub == '0':
out.writelines('import Modelica.Electrical.*;')
@@ -949,7 +950,7 @@ class NgMoConverter:
else:
out.writelines(eachline)
out.writelines('\n')
- out.writelines('end '+ os.path.basename(newfilename) + ';')
+ out.writelines('end '+ newfilename + ';')
out.writelines('\n')
out.close()