#!/home/conda/feedstock_root/build_artifacts/meds_1756643425244/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/bin/python
"""
    %prog [options] meds_file start end output_file


Description

    Extract a range of objects from a MEDS file and write a new file.
"""

import sys
from optparse import OptionParser
import meds

parser=OptionParser(__doc__)

def main():
    options, args = parser.parse_args(sys.argv[1:])

    if len(args) < 4:
        parser.print_help()
        sys.exit(1)

    meds_file=args[0]
    start=int(args[1])
    end=int(args[2])
    out_file=args[3]

    meds.extract_range(meds_file, start, end, out_file)
 
main()
