':return: The path to the directory of a package. None in case it\'s not
a package.'

def _get_init_directory(self):

    for (suffix, _, _) in imp.get_suffixes():
        ending = ('__init__' + suffix)
        py__file__ = self.py__file__()
        if ((py__file__ is not None) and py__file__.endswith(ending)):
            return self.py__file__()[:((- len(ending)) - 1)]
    return None
