rename.py


USAGE

rename.py rename file data file

where rename file is a file containing 2 fields per line: the old (existing) name, and the replacement. No comment or blank lines allowed. Fields are separated by whitespace. data file is the file to have substitutions performed. The result is printed to standard out (the screen).

OVERVIEW

rename.py uses the regular expression capabilities of Python to replace every occurance of a given station name with another. Actually, the program reads each line of the data file and replaces all occurences on that line. Moreover, it should be possible to use the regular expression syntax of Python; this has not been tested!

This program is normally called from inside generate_table.