def __call__(self,*packages, **options):
frame = self.parent_frame<EOL>self.info_modules = {}<EOL>if options.get('<STR_LIT>', False):<EOL><INDENT>self.imported_packages = []<EOL><DEDENT>self.verbose = verbose = options.get('<STR_LIT>', -<NUM_LIT:1>)<EOL>postpone = options.get('<STR_LIT>', None)<EOL>self._init_info_modules(packages or None)<EOL>self.log('<STR_LIT>'% self.parent_name)<EOL>for package_name in self._get_sorted_names():<EOL><INDENT>if package_name in self.imported_packages:<EOL><INDENT>continue<EOL><DEDENT>info_module = self.info_modules[package_name]<EOL>global_symbols = getattr(info_module, '<STR_LIT>', [])<EOL>postpone_import = getattr(info_module, '<STR_LIT>', False)<EOL>if (postpone and not global_symbols)or (postpone_import and postpone is not None):<EOL><INDENT>continue<EOL><DEDENT>old_object = frame.f_locals.get(package_name, None)<EOL>cmdstr = '<STR_LIT>'+package_name<EOL>if self._execcmd(cmdstr):<EOL><INDENT>continue<EOL><DEDENT>self.imported_packages.append(package_name)<EOL>if verbose!=-<NUM_LIT:1>:<EOL><INDENT>new_object = frame.f_locals.get(package_name)<EOL>if old_object is not None and old_object is not new_object:<EOL><INDENT>self.warn('<STR_LIT>'% (package_name, self._obj2repr(new_object),<EOL>self._obj2repr(old_object)))<EOL><DEDENT><DEDENT>if '<STR_LIT:.>' not in package_name:<EOL><INDENT>self.parent_export_names.append(package_name)<EOL><DEDENT>for symbol in global_symbols:<EOL><INDENT>if symbol=='<STR_LIT:*>':<EOL><INDENT>symbols = eval('<STR_LIT>'% (package_name),<EOL>frame.f_globals, frame.f_locals)<EOL>if symbols is None:<EOL><INDENT>symbols = eval('<STR_LIT>' % (package_name),<EOL>frame.f_globals, frame.f_locals)<EOL>symbols = [s for s in symbols if not s.startswith('<STR_LIT:_>')]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>symbols = [symbol]<EOL><DEDENT>if verbose!=-<NUM_LIT:1>:<EOL><INDENT>old_objects = {}<EOL>for s in symbols:<EOL><INDENT>if s in frame.f_locals:<EOL><INDENT>old_objects[s] = frame.f_locals[s]<EOL><DEDENT><DEDENT><DEDENT>cmdstr = '<STR_LIT>'+package_name+'<STR_LIT>'+symbol<EOL>if self._execcmd(cmdstr):<EOL><INDENT>continue<EOL><DEDENT>if verbose!=-<NUM_LIT:1>:<EOL><INDENT>for s, old_object in old_objects.items():<EOL><INDENT>new_object = frame.f_locals[s]<EOL>if new_object is not old_object:<EOL><INDENT>self.warn('<STR_LIT>'% (s, self._obj2repr(new_object),<EOL>self._obj2repr(old_object)))<EOL><DEDENT><DEDENT><DEDENT>if symbol=='<STR_LIT:*>':<EOL><INDENT>self.parent_export_names.extend(symbols)<EOL><DEDENT>else:<EOL><INDENT>self.parent_export_names.append(symbol)<EOL><DEDENT><DEDENT><DEDENT>return<EOL>
Load one or more packages into parent package top-level namespace.

       This function is intended to shorten the need to import many
       subpackages, say of scipy, constantly with statements such as

         import scipy.linalg, scipy.fftpack, scipy.etc...

       Instead, you can say:

         import scipy
         scipy.pkgload('linalg','fftpack',...)

       or

         scipy.pkgload()

       to load all of them in one call.

       If a name which doesn't exist in scipy's namespace is
       given, a warning is shown.

       Parameters
       ----------
        *packages : arg-tuple
             the names (one or more strings) of all the modules one
             wishes to load into the top-level namespace.
        verbose= : integer
             verbosity level [default: -1].
             verbose=-1 will suspend also warnings.
        force= : bool
             when True, force reloading loaded packages [default: False].
        postpone= : bool
             when True, don't load packages [default: False]