#! /usr/bin/env python2

import logging
import argparse

parser = argparse.ArgumentParser(description='Try out argparse.REMAINDER')
parser.add_argument('args', metavar='arg', nargs=argparse.REMAINDER, help='Zero or more arguments')
parser.add_argument('-v', '--verbose', action='count', help='Enable debugging')
args = parser.parse_args()

logging.basicConfig(format='%(asctime)s %(levelname)s %(pathname)s:%(lineno)d %(msg)s')
log = logging.getLogger()
# log.setLevel(logging.DEBUG if args.verbose else logging.WARNING)
log.setLevel(logging.WARNING - (args.verbose or 0)*10)

print args
