+pat_fl1 = re.compile(r'^#LyX file created by tex2lyx .*$')
+pat_fl2 = re.compile(r'^#LyX \d+\.\d+ created this file.*$')
+
+def compareLyx(lines1, lines2):
+ if lines1[1:] != lines2[1:]:
+ return False
+ if not pat_fl1.match(lines1[0]) and not pat_fl2.match(lines1[0]):
+ return False
+ if not pat_fl1.match(lines2[0]) and not pat_fl2.match(lines2[0]):
+ return False
+ return True