In the below hierachy, is there a convenient and universal way to reference to the top_package using a generic term in all .py file below? I would like to have a consistent way
This works from within a library module:
import __main__ as main_package TOP_PACKAGE = main_package.__package__.split('.')[0]