Python: import the containing package

后端 未结 5 1405
夕颜
夕颜 2020-12-13 12:00

In a module residing inside a package, i have the need to use a function defined within the __init__.py of that package. how can i import the package within the

5条回答
  •  醉梦人生
    2020-12-13 12:41

    In Django, the file manage.py has from django.core.management import execute_manager, but execute_manager is not a module. It is a function within the __init__.py module of the management directory.

提交回复
热议问题