make compatible with python 3.11 as well as 3.10

This commit is contained in:
Philip Sargent
2022-11-18 20:42:03 +00:00
parent 725c5ad0cd
commit 4514eda311
3 changed files with 15 additions and 5 deletions

View File

@@ -118,6 +118,8 @@ class LoadingSurvex():
other survex files.
A 'scanswallet' is what we today call a "survey scans folder" or a "wallet".
"""
# python regex flags (?i) means case-insentitive, (?s) means . matches newline too
# see https://docs.python.org/3/library/re.html
rx_begin = re.compile(r'(?i)begin')
rx_end = re.compile(r'(?i)end$')
rx_title = re.compile(r'(?i)title$')