#NEWLINE# def load_plugin( self , name ) : #NEWLINE# #INDENT# 'This automatically loads a plugin by the given name from the\n        current source and returns the module.  This is a convenient\n        alternative to the import statement and saves you from invoking\n        ``__import__`` or a similar function yourself.\n\n        :param name: the name of the plugin to load.\n        ' #NEWLINE# if ( '.' in name ) : #NEWLINE# #INDENT# raise ImportError ( 'Plugin names cannot contain dots.' ) #NEWLINE# #UNINDENT# with self : #NEWLINE# #INDENT# return __import__ ( ( ( self . base . package + '.' ) + name ) , globals ( ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , [ '__name__' ] )