[Python-Dev] Question on imports and packages (original) (raw)
Guido van Rossum guido at python.org
Wed Nov 3 01:35:55 CET 2010
- Previous message: [Python-Dev] Question on imports and packages
- Next message: [Python-Dev] Question on imports and packages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If you are importing the code, the module attribute on each class should tell you where it is actually defined (as opposed to where you imported it from). Then sys.modules gives you the module object which has a file attribute, etc.
On Tue, Nov 2, 2010 at 4:44 PM, Raymond Hettinger <raymond.hettinger at gmail.com> wrote:
Brett, Does the import mechanism for importing packages preserve enough information to be able to figure-out where all the components are defined? I'm wondering if it is possible for the class browser to be built-out to scan/navigate class structure across a module that has been split into a package.
-- --Guido van Rossum (python.org/~guido)
- Previous message: [Python-Dev] Question on imports and packages
- Next message: [Python-Dev] Question on imports and packages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]