Question : How to make visible functions at package level in python?

I have package that contains several modules. I would like to expose some functions from a module to the package level.

How to do that?

package
__init__.py
module.py that contains function

So ...
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
# example
 
import package
 
package.function()
 
# here the function definition is in the module.py
# how to avoid this:
 
import package.module
 
package.module.function()
Open in New Window Select All

Answer : How to make visible functions at package level in python?

Within effects/__init__.py, do:

from echo import delay
Random Solutions  
 
programming4us programming4us