This script demonstrates how to parse the genemap2.txt file that can be downloaded from OMIM. Note that while it parses out every field in the file it doesn't output anything.
The genemap2.txt file can downloaded from OMIM Downloads (registration required).
cat genemap2.txt | ./parseGeneMap2.py