(self, name, atom=True, rss=True)
Load a specific extension by name.

        :param name: Name of the extension to load.
        :param atom: If the extension should be used for ATOM feeds.
        :param rss: If the extension should be used for RSS feeds.
Load a specific extension by name.
Load a specific extension by name .
def load_extension(self, name, atom=True, rss=True):
        '''Load a specific extension by name.

        :param name: Name of the extension to load.
        :param atom: If the extension should be used for ATOM feeds.
        :param rss: If the extension should be used for RSS feeds.
        '''
        # Check loaded extensions
        if not isinstance(self.__extensions, dict):
            self.__extensions = {}
        if name in self.__extensions.keys():
            raise ImportError('Extension already loaded')

        # Load extension
        extname = name[0].upper() + name[1:] + 'EntryExtension'
        try:
            supmod = __import__('feedgen.ext.%s_entry' % name)
            extmod = getattr(supmod.ext, name + '_entry')
        except ImportError:
            # Use FeedExtension module instead
            supmod = __import__('feedgen.ext.%s' % name)
            extmod = getattr(supmod.ext, name)
        ext = getattr(extmod, extname)
        self.register_extension(name, ext, atom, rss)
def load_extension ( self , name , atom = True , rss = True ) : # Check loaded extensions if not isinstance ( self . __extensions , dict ) : self . __extensions = { } if name in self . __extensions . keys ( ) : raise ImportError ( 'Extension already loaded' ) # Load extension extname = name [ 0 ] . upper ( ) + name [ 1 : ] + 'EntryExtension' try : supmod = __import__ ( 'feedgen.ext.%s_entry' % name ) extmod = getattr ( supmod . ext , name + '_entry' ) except ImportError : # Use FeedExtension module instead supmod = __import__ ( 'feedgen.ext.%s' % name ) extmod = getattr ( supmod . ext , name ) ext = getattr ( extmod , extname ) self . register_extension ( name , ext , atom , rss )