def submission_getter(submission_list, verbose = False):
    submissions = []
    scores = []
    subreddits = set()

    for x, submission in enumerate(submission_list):
        submissions.append(submission)
        if verbose:
            scores.append(submission.score)
            subreddits.add(str(submission.subreddit))

    if not verbose:
        return submissions

    count_width = int(math.log(len(submissions), 10)) + 1
    score_width = len(str(max(scores)))

    fmt = {'arrow': ' -> '}
    indent = ' ' * (count_width + len(fmt['arrow']) + score_width + 1)

    try:
        _, terminal_width = os.popen('stty size', 'r').read().split()
        terminal_width = int(terminal_width)
    except:
        terminal_width = 80

    wrapper = TextWrapper(subsequent_indent = indent, width = terminal_width)

    for i, submission in enumerate(submissions):
        fmt['count'] = color.OKGREEN + str(i + 1).rjust(count_width)
        fmt['score'] = color.WARNING + str(submission.score).rjust(score_width)
        fmt['title'] = color.OKBLUE + submission.title
        fmt['tags'] = get_link_types(submission)

        if len(subreddits) > 1:
            fmt['title'] += color.SUBTEXT + u' ({0})'.format(submission.subreddit)

        wrap = wrapper.wrap(
            u'{count}{arrow}{score} {title} {tags}'.format(**fmt))

        for line in wrap:
            print line

    return submissions


# View a subreddit (i.e. display the links from it)
dataset/ETHPy150Open jawerty/AlienFeed/alienfeed/alien.py/submission_getter/original