#NEWLINE# def mod_data( opts , full ) : #NEWLINE# #INDENT# "\n    Grab the module's data\n    " #NEWLINE# ret = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# finder = modulefinder . ModuleFinder ( ) #NEWLINE# try : #NEWLINE# #INDENT# finder . load_file ( basemod ) #NEWLINE# #UNINDENT# except ImportError as exc : #NEWLINE# #INDENT# print ( 'ImportError - {0} (Reason: {1})' . format ( full , exc ) , file = sys . stderr ) #NEWLINE# return ret #NEWLINE# #UNINDENT# for ( name , mod ) in finder . modules . items ( ) : #NEWLINE# #INDENT# basemod = name . split ( '.' ) [ 0 ] #NEWLINE# if ( basemod in ret ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if basemod . startswith ( '_' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not mod . __file__ ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( opts [ 'bif' ] not in mod . __file__ ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( name == os . path . basename ( mod . __file__ ) [ : ( - 3 ) ] ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ret [ basemod ] = mod . __file__ #NEWLINE# #UNINDENT# for ( name , err ) in finder . badmodules . items ( ) : #NEWLINE# #INDENT# basemod = name . split ( '.' ) [ 0 ] #NEWLINE# if ( basemod in ret ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if basemod . startswith ( '_' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ret [ basemod ] = err #NEWLINE# #UNINDENT# return ret