def parse_path(path):
    """Parses path, creates normalized segment list.

    Dots are collapsed:

        >>> parse_path('../static//../app.py')
        ['app.py']

    :param path: path string to parse
    :return: normalized list of path segments.
    """
    segments = path.split('/')
    result = []
    for segment in segments:
        if not segment or segment == '.':
            continue
        if segment == '..':
            try:
                result.pop()
            except IndexError:
                pass
        else:
            result.append(segment)
    return result
