string = "[c_solver_constitutive_law0d]\n"
for line in lines:
- for key in KEYS:
+ for key in MAP_KEYS:
if key + "=" in line:
string += key + "=" + line.split("'")[1] + "\n"
output_filename = os.path.splitext(input_filename)[0] + ".input"
with open(output_filename, "w") as new_file:
new_file.write(string)
- print ('je convertis le fichier comm en input de MAP')
return output_filename
with open("toto.input",'w') as f_out :
config.write(f_out)
-def run(editor):
- print ('je rentre dans run')
- print editor.fichier
- command_file = "/home/C41270/MAPinput_test.comm" # TODO: nom en dur
-
+def run(listeParam):
+ command_file=listeParam[0].fichier
command_file = comm2MAPinput(command_file)
- os.system("map -r sappli run -n C_solver_constitutive_law0d -i " + command_file)
+ command = "map -r sappli run -n C_solver_constitutive_law0d -i " + command_file
+ os.system(command)
print "calcul fini, youpi !"
- #+def run(listeParam):
- #+ print ('je rentre dans run')
- #+ editor=listeParam[0]
- #+ print (editor)
- #+ print (dir(editor))
# le dictionnaire des commandes a la structure suivante :
config.add_section("c_solver_constitutive_law0d")
for key, value in self.dictValeur.iteritems():
- if key in KEYS:
+ if key in MAP_KEYS:
config.set("c_solver_constitutive_law0d", key, value)
input_filname = os.path.splitext(fn)[0] + ".input"