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 module that resides within the package, so i can use that function?
Importing __init__
inside the module will not import the package, but instead a module named __init__
, leading to two copies of things with different names...
Is there a pythonic way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…