Newer
Older
CipollaMod / create_package_list.py
Francesco Mecca on 20 Mar 2020 366 bytes py2to3
import pkgutil
import spyd
package=spyd
print("packages = [")
for importer, modname, ispkg in pkgutil.walk_packages(path=package.__path__,
                                                      prefix=package.__name__+'.',
                                                      onerror=lambda x: None):
    if ispkg:
        print("\t'{}',".format(modname))
print("]")