package structure?

Torsten Mohr tmohr at
Sun Dec 14 21:16:34 CET 2008


in a package i'd like to have a structure like this:

Files end with ".py", others are directories:

mod       # sets __all__ = ['smod1']          # contains AClass()
  smod1     # sets __all__ = ['abc', 'def']

So i can now do:

import mod.smod1

But functions/classes in are not found:

a = mod.smod1.AClass()

I know this is somehow ambiguous, but i wonder how else i can make
"mod" have subpackages and modules.

I wonder how i can make AClass() known in that package.

Thanks for any hints,

More information about the Python-list mailing list