'Return a list of packages from which commands are loaded.'

def get_command_packages(self):

    pkgs = self.command_packages
    if (not isinstance(pkgs, list)):
        if (pkgs is None):
            pkgs = ''
        pkgs = [pkg.strip() for pkg in pkgs.split(',') if (pkg != '')]
        if ('distutils.command' not in pkgs):
            pkgs.insert(0, 'distutils.command')
        self.command_packages = pkgs
    return pkgs
