diff --git a/Coil_geometry/Export_field/05_Write_to_txt.py b/Coil_geometry/Export_field/05_Write_to_txt.py index e8660e4..716073c 100644 --- a/Coil_geometry/Export_field/05_Write_to_txt.py +++ b/Coil_geometry/Export_field/05_Write_to_txt.py @@ -46,7 +46,8 @@ def main(): raise ValueError str_line = str_line + str_el + ' ' - bx_txt.writelines(str_line) + str_line += '\n' + bx_txt.write(str_line) bx_txt.close() by_txt = open("output/step_50μm/By_step_50.txt", "w+") @@ -68,8 +69,8 @@ def main(): raise ValueError str_line = str_line + str_el + ' ' - - by_txt.writelines(str_line) + str_line += '\n' + by_txt.write(str_line) by_txt.close() bz_txt = open("output/step_50μm/Bz_step_50.txt", "w+") @@ -90,9 +91,9 @@ def main(): if len(str_el) != 8: raise ValueError - str_line = str_line + str_el + ' ' - - bz_txt.writelines(str_line) + str_line += str_el + ' ' + str_line += '\n' + bz_txt.write(str_line) bz_txt.close() """