'Parse command line arguments'

def _parse_arguments(self, args):

    try:
        course_key = CourseKey.from_string(args[0])
        filename = args[1]
    except InvalidKeyError:
        raise CommandError('Unparsable    course_id')
    except IndexError:
        raise CommandError('Insufficient    arguments')
    pipe_results = False
    if (filename == '-'):
        filename = mktemp()
        pipe_results = True
    return (course_key, filename, pipe_results)
