#NEWLINE# def moduleProvides( * interfaces ) : #NEWLINE# #INDENT# "Declare interfaces provided by a module\n\n    This function is used in a module definition.\n\n    The arguments are one or more interfaces or interface specifications\n    (``IDeclaration`` objects).\n\n    The given interfaces (including the interfaces in the specifications) are\n    used to create the module's direct-object interface specification.  An\n    error will be raised if the module already has an interface specification.\n    In other words, it is an error to call this function more than once in a\n    module definition.\n\n    This function is provided for convenience. It provides a more convenient\n    way to call directlyProvides. For example::\n\n      moduleImplements(I1)\n\n    is equivalent to::\n\n      directlyProvides(sys.modules[__name__], I1)\n    " #NEWLINE# frame = sys . _getframe ( 1 ) #NEWLINE# locals = frame . f_locals #NEWLINE# if ( ( locals is not frame . f_globals ) or ( '__name__' not in locals ) ) : #NEWLINE# #INDENT# raise TypeError ( 'moduleProvides can only be used from a module definition.' ) #NEWLINE# #UNINDENT# if ( '__provides__' in locals ) : #NEWLINE# #INDENT# raise TypeError ( 'moduleProvides can only be used once in a module definition.' ) #NEWLINE# #UNINDENT# locals [ '__provides__' ] = Provides ( ModuleType , * _normalizeargs ( locals ) )