Avatar ·

Appeal to the function specified in __init__.py

📁 функция, python, пример, ии, проект

When initializing the package in Python 2.7, I need to determine the functions that should be common to all modules of this package. I identified them in __ Init __. Py . How to contact it now inside the package? It tus out from the outside:

   IMPORT  PACKAGE.MODULEPACKAGE.FOO () #Contact   

inside the package (for example, in the module module), not defined foo , duir (__ pacquage __) - also It does not display this function.

The structure of the project:

  Package \ # package   __init__.py # here is the function   module.py # here I need to cause      

names, of course, differ.