(pkg_name)
>>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
>>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
>>> list ( install_lib . _all_packages ( foo . bar . baz )) [ foo . bar . baz foo . bar foo ]
def _all_packages(pkg_name):
        """
        >>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
        """
        while pkg_name:
            yield pkg_name
            pkg_name, sep, child = pkg_name.rpartition('.')
def _all_packages ( pkg_name ) : while pkg_name : yield pkg_name pkg_name , sep , child = pkg_name . rpartition ( '.' )