def linux_distribution(distname='', version='', id='', supported_dists=_supported_dists, full_distribution_name=1):
 try:
  etc = os.listdir(_UNIXCONFDIR)
 except OSError:
  return (distname, version, id)
 etc.sort()
 for file in etc:
  m = _release_filename.match(file)
  if (m is not None):
   (_distname, dummy) = m.groups()
   if (_distname in supported_dists):
    distname = _distname
    break
 else:
  return _dist_try_harder(distname, version, id)
 with open(os.path.join(_UNIXCONFDIR, file), 'r', encoding='utf-8', errors='surrogateescape') as f:
  firstline = f.readline()
 (_distname, _version, _id) = _parse_release_file(firstline)
 if (_distname and full_distribution_name):
  distname = _distname
 if _version:
  version = _version
 if _id:
  id = _id
 return (distname, version, id)

def linux_distribution ( distname = '' , version = '' , id = '' , supported_dists = _supported_dists , full_distribution_name = 1 ) : try : etc = os . listdir ( _UNIXCONFDIR ) except OSError : return ( distname , version , id ) etc . sort ( ) for file in etc : m = _release_filename . match ( file ) if ( m is not None ) : ( _distname , dummy ) = m . groups ( ) if ( _distname in supported_dists ) : distname = _distname break else : return _dist_try_harder ( distname , version , id ) with open ( os . path . join ( _UNIXCONFDIR , file ) , 'r' , encoding = 'utf-8' , errors = 'surrogateescape' ) as f : firstline = f . readline ( ) ( _distname , _version , _id ) = _parse_release_file ( firstline ) if ( _distname and full_distribution_name ) : distname = _distname if _version : version = _version if _id : id = _id return ( distname , version , id )
return information about the current linux distribution as a tuple with items as follows: * id_name: if *full_distribution_name* is false .