Mercurial > hg > numerics
view numerics/manipulate.py @ 106:895ad896023a
cleanup
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 15 Mar 2015 09:54:13 -0700 |
parents | 82a18c9337c3 |
children | 19a5c2fb52bb |
line wrap: on
line source
#!/usr/bin/env python # -*- coding: utf-8 -*- """ manipulate CSV data """ # imports import argparse import os import sys from .convert import cast_columns from .read import CSVParser # module globals __all__ = ['ManipulationParser', 'main'] here = os.path.dirname(os.path.realpath(__file__)) string = (str, unicode) class ManipulationParser(CSVParser): """CLI option parser for data manipulation""" def __init__(self, **kwargs): kwargs.setdefault('description', __doc__) CSVParser.__init__(self, **kwargs) self.options = None def typed_data(self): raise NotImplementedError('TODO') # -> record TODO items def main(args=sys.argv[1:]): """CLI""" # parse command line options parser = ManipulationParser() options = parser.parse_args(args) if __name__ == '__main__': main()