Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import os.path
- home = os.getenv("a_HOME")
- filepath = os.path.join(home, "components", "xxx", "etc", "static-data", "GenericEntityList.xml")
- with open(filepath, 'r') as f:
- for line in f:
- print(line)
- lines = f.readlines()
- f.close()
- home = os.getenv("b_home")
- filepath = os.path.join(home, "components", "xxx", "etc", "static-data", "GenericEntityList.xml")
- with open(filepath, 'r') as f:
- for line in f:
- if line!='</generic-entity-list>'+'\n':
- f.write(line)
- f.write('<entity>xx1</entity>\n')
- f.write('<entity>xx2</entity>\n')
- f.write('</generic-entity-list>\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement