Python Finding all packages inside a package, even when in an egg
- by cool-RR
Given a Python package, how can I automatically find all its sub-packages?
I used to have a function that would just browse the file system, looking for folders that have an __init__.py* file in them, but now I need a method that would work even if the whole package is in an egg.