#NEWLINE# def setmodule( self , module , priority = 'project' ) : #NEWLINE# #INDENT# '\n        Store settings from a module with a given priority.\n\n        This is a helper function that calls\n        :meth:`~scrapy.settings.BaseSettings.set` for every globally declared\n        uppercase variable of ``module`` with the provided ``priority``.\n\n        :param module: the module or the path of the module\n        :type module: module object or string\n\n        :param priority: the priority of the settings. Should be a key of\n            :attr:`~scrapy.settings.SETTINGS_PRIORITIES` or an integer\n        :type priority: string or int\n        ' #NEWLINE# self . _assert_mutability ( ) #NEWLINE# if isinstance ( self , six . string_types ) : #NEWLINE# #INDENT# module = import_module ( module ) #NEWLINE# #UNINDENT# for key in dir ( module ) : #NEWLINE# #INDENT# if key . isupper ( ) : #NEWLINE# #INDENT# self . set ( key , getattr ( module , key ) , priority )