bac.py 832 B

12345678910111213141516171819202122232425262728
  1. '''
  2. Created on 13 dec. 2016
  3. @author: olivier.massot
  4. '''
  5. import re
  6. CMP_IGNORE_LINES = ["<dataroot xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" generated=\"\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\">"]
  7. line = """<dataroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" generated="2016-12-13T10:46:21">"""
  8. # print(re.match(CMP_IGNORE_LINES[0], str(line)))
  9. with open(r"C:\dev\access\OpenAccess\tests\reference\source\tables\TableTestAdvancedFields.xml", "rb") as source_file:
  10. count= 0
  11. for line in source_file:
  12. count += 1
  13. if count == 198:
  14. print(line)
  15. print(str(line))
  16. ignore = False
  17. for ignore_regex in CMP_IGNORE_LINES:
  18. if re.match(ignore_regex, str(line)) != None:
  19. print(line)
  20. ignore = True