python reference parent module

Solutions on MaxInterview for python reference parent module by the best coders in the world

showing results for - "python reference parent module"
Lisa
06 Nov 2018
1$ cat function/bbb.py
2import os
3import sys
4
5root_folder = os.path.abspath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6sys.path.append(root_folder)
7
8from common.aaa import say_hi
9
10say_hi()
11
Noah
29 Nov 2020
1from .some_module import some_class
2from ..some_package import some_function
3from . import some_class
4