Mercurial > hg > GlobalNeighbors
diff globalneighbors/grid.py @ 16:4583d0d9331a
stub command line entry for gridding neighbors
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 25 Jun 2017 15:03:54 -0700 |
parents | 21095c9006e5 |
children | 2fef925fbf37 |
line wrap: on
line diff
--- a/globalneighbors/grid.py Sun Jun 25 14:55:53 2017 -0700 +++ b/globalneighbors/grid.py Sun Jun 25 15:03:54 2017 -0700 @@ -1,4 +1,13 @@ +#!/usr/bin/env python + +""" +grid locations, for speed and fidelity +""" + import math +import sys +from .cli import CitiesParser +from .locations import locations class LatLonGrid(object): @@ -71,4 +80,16 @@ def __init__(self, locations): raise NotImplementedError('TODO') -def main( +def main(args=sys.argv[1:]): + """CLI""" + + # parse command line + parser = CitiesParser(description=__doc__) + options = parser.parse_args(args) + + # read locations + city_locations = locations(parser.read_cities()) + +if __name__ == '__main__': + main() +