Mercurial > hg > GlobalNeighbors
view globalneighbors/path.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 | 5dba84370182 |
children |
line wrap: on
line source
""" path related utilities """ def ensure_dir(directory): """ensure a directory exists""" if os.path.exists(directory): if not os.path.isdir(directory): raise OSError("Not a directory: '{}'".format(directory)) return directory os.makedirs(directory) return directory