#NEWLINE# def _getImplementation( self ) : #NEWLINE# #INDENT# '\n        Pick a method which gives correct results for C{_listOpenFDs} in this\n        runtime environment.\n\n        This involves a lot of very platform-specific checks, some of which may\n        be relatively expensive.  Therefore the returned method should be saved\n        and re-used, rather than always calling this method to determine what it\n        is.\n\n        See the implementation for the details of how a method is selected.\n        ' #NEWLINE# for impl in after . _implementations : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# before = impl ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# fp = self . openfile ( '/dev/null' , 'r' ) #NEWLINE# after = impl ( ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# fp . close ( ) #NEWLINE# #UNINDENT# if ( before != after ) : #NEWLINE# #INDENT# return impl #NEWLINE# #UNINDENT# #UNINDENT# return impl