#NEWLINE# def get_packages( self , show ) : #NEWLINE# #INDENT# '\n        Return list of Distributions filtered by active status or all\n\n        @param show: Type of package(s) to show; active, non-active or all\n        @type show: string: "active", "non-active", "all"\n\n        @returns: list of pkg_resources Distribution objects\n        ' #NEWLINE# if ( ( show == 'nonactive' ) or ( show == 'all' ) ) : #NEWLINE# #INDENT# all_packages = [ ] #NEWLINE# for package in self . environment : #NEWLINE# #INDENT# for i in range ( len ( self . environment [ package ] ) ) : #NEWLINE# #INDENT# if self . environment [ package ] [ self ] : #NEWLINE# #INDENT# all_packages . append ( self . environment [ package ] [ i ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return all_packages #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . working_set