Created
July 12, 2016 05:25
-
-
Save mithrandi/a71bffcdc4e42496e39a6a659aa1fe7f to your computer and use it in GitHub Desktop.
Script to merge hg shamaps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
revmap2 = {} | |
with open(sys.argv[2]) as fMap2: | |
for line in fMap2: | |
a, b = line.rstrip('\n').split(' ') | |
revmap2[a] = b | |
with open(sys.argv[1]) as fMap1: | |
for line in fMap1: | |
a, b = line.rstrip('\n').split(' ') | |
print '%s %s' % (a, revmap2[b]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment