def dist(distname='',version='',id='',

         supported_dists=('SuSE', 'debian', 'fedora', 'redhat', 'mandrake')):
    try:
        etc = os.listdir('/etc')
    except os.error:
        # Probably not a Unix system
        return distname,version,id
    for file in etc:
        m = _release_filename.match(file)
        if m:
            _distname,dummy = m.groups()
            if _distname in supported_dists:
                distname = _distname
                break
    else:
        return _dist_try_harder(distname,version,id)
    f = open('/etc/'+file,'r')
    firstline = f.readline()
    f.close()
    m = _release_version.search(firstline)
    if m:
        _version,_id = m.groups()
        if _version:
            version = _version
        if _id:
            id = _id
    else:
        # Unkown format... take the first two words
        l = string.split(string.strip(firstline))
        if l:
            version = l[0]
            if len(l) > 1:
                id = l[1]
    return distname,version,id
Parse the URL string with the url map of this app instance.
dataset/ETHPy150Open babble/babble/include/jython/Lib/platform.py/dist--crossover with--dataset/ETHPy150Open douban/brownant/brownant/app.py/Brownant.parse_url