equal
deleted
inserted
replaced
329 LOAD_POU_INSTANCES_PROJECT_TEMPLATE(body_type) % xml_string) |
329 LOAD_POU_INSTANCES_PROJECT_TEMPLATE(body_type) % xml_string) |
330 return project_pou_instances_xpath[body_type](root), error |
330 return project_pou_instances_xpath[body_type](root), error |
331 |
331 |
332 |
332 |
333 def SaveProject(project, filepath): |
333 def SaveProject(project, filepath): |
334 project_file = open(filepath, 'w') |
334 content = etree.tostring( |
335 project_file.write(etree.tostring( |
|
336 project, |
335 project, |
337 pretty_print=True, |
336 pretty_print=True, |
338 xml_declaration=True, |
337 xml_declaration=True, |
339 encoding='utf-8')) |
338 encoding='utf-8') |
|
339 |
|
340 assert len(content) != 0 |
|
341 |
|
342 project_file = open(filepath, 'w') |
|
343 project_file.write(content) |
340 project_file.close() |
344 project_file.close() |
341 |
345 |
342 |
346 |
343 # ---------------------------------------------------------------------- |
347 # ---------------------------------------------------------------------- |
344 |
348 |