Python submodules and name imports

Frank Aune Frank.Aune at
Thu Aug 23 15:58:50 CEST 2007


First take a look at:

as I will use this module file layout as an example.

If I want to do the following:

from Sound import Effects
Effects.echo.echofilte(bla bla)

What will Sound/Effects/ need to contain then? I tried to define 
the __all__ = ['echo','surround','reverse']  parameter in the init file, but 
this only seems to be effective for " .. import *" statements.

Is the correct way of accomplishing this to explicitly import the submodules 
in sound/Effects/ I'm looking for the "official" way of doing 

Thank you,
Frank Aune

More information about the Python-list mailing list