def get_installed_distributions(local_only=True, skip=('setuptools', 'pip', 'python', 'distribute'), include_editables=True, editables_only=False):
 if local_only:
  local_test = dist_is_local
 else:
  local_test = (lambda d: True)
 if include_editables:
  editable_test = (lambda d: True)
 else:
  editable_test = (lambda d: (not dist_is_editable(d)))
 if editables_only:
  editables_only_test = (lambda d: dist_is_editable(d))
 else:
  editables_only_test = (lambda d: True)
 return [d for d in pkg_resources.working_set if (local_test(d) and (d.key not in skip) and editable_test(d) and editables_only_test(d))]

def get_installed_distributions ( local_only = True , skip = ( 'setuptools' , 'pip' , 'python' , 'distribute' ) , include_editables = True , editables_only = False ) : if local_only : local_test = dist_is_local else : local_test = ( lambda d : True ) if include_editables : editable_test = ( lambda d : True ) else : editable_test = ( lambda d : ( not dist_is_editable ( d ) ) ) if editables_only : editables_only_test = ( lambda d : dist_is_editable ( d ) ) else : editables_only_test = ( lambda d : True ) return [ d for d in pkg_resources . working_set if ( local_test ( d ) and ( d . key not in skip ) and editable_test ( d ) and editables_only_test ( d ) ) ]
return a list of installed distribution objects .