#NEWLINE# def find_modules_from_files( self , pyfiles ) : #NEWLINE# #INDENT# ' returns a lisst of modules given a list of files ' #NEWLINE# imports = [ self . __importify ( s ) for s in pyfiles ] #NEWLINE# system_paths = [ ] #NEWLINE# for s in sys . path : #NEWLINE# #INDENT# system_paths . append ( self . __importify ( s , True ) ) #NEWLINE# #UNINDENT# ret = [ ] #NEWLINE# for imp in imports : #NEWLINE# #INDENT# if ( imp is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# choices = [ ] #NEWLINE# for s in system_paths : #NEWLINE# #INDENT# if imp . startswith ( s ) : #NEWLINE# #INDENT# add = imp [ ( len ( s ) + 1 ) : ] #NEWLINE# if add : #NEWLINE# #INDENT# choices . append ( add ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( not choices ) : #NEWLINE# #INDENT# sys . stdout . write ( ( 'PYTHONPATH not found for file: %s\n' % imp ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for ( i , import_str ) in enumerate ( choices ) : #NEWLINE# #INDENT# mod = self . __get_module_from_str ( import_str , print_exception = ( i == ( len ( choices ) - 1 ) ) ) #NEWLINE# if ( mod is not None ) : #NEWLINE# #INDENT# ret . append ( mod ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ret