python import引用上上上级包的三种办法

233 阅读1分钟

方法一


相对引用: from ..base import xx

方法二

用sys.path.append

方法三

path这个