Created
May 7, 2013 01:17
-
-
Save jasongallant/5529617 to your computer and use it in GitHub Desktop.
Python: Calculate Distances
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
#!/usr/bin/env python | |
import sys | |
inputfile = sys.argv[1] | |
with open(inputfile) as fd: | |
next(fd) | |
for line in fd: | |
columns=line.split() | |
#print columns | |
columns=map(float,columns[1:5]) | |
#print columns | |
#print columns[1],columns[0] | |
print "%s \t %s" % (columns[1] - columns[0], columns[3]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment