I have the following code in .py file:
import re
regex = re.compile(
r"""ULLAT:\ (?P<ullat>-?[\d.]+).*?
ULLON:\ (?P<ullon>-?[\d.]+).*?
LRLAT:\ (?P<lrlat>-?[\d.]+)""", re.DOTALL|re.VERBOSE)
I have the data in .txt file as a sequence:
QUADNAME: rockport_colony_SD
RESOLUTION: 10 ULLAT: 43.625 ULLON:
-97.87527466 LRLAT: 43.5 LRLON: -97.75027466 HDATUM: 27 ZMIN: 361.58401489 ZMAX: 413.38400269 ZMEAN: 396.1293335 ZSIGMA: 12.36359215 PMETHOD: 5 QUADDATE: 20001001
How can I use the Python -file to process the .txt -file?
I guess that we need a parameter in the .py file, so that we can use a syntax like in terminal:
$ py-file file-to-be-processed
This question was raised by the post here.