擅长:python、mysql、java
<p>使用<code>from ..config import DEFAULT_DATA_PATH</code></p>
<p>参考:<a href="https://docs.python.org/2/tutorial/modules.html#intra-package-references" rel="nofollow noreferrer">Intra-package References</a></p>
<p>如果出现错误:<code>Attempted relative import in non-package</code></p>
<p>参考:<a href="https://stackoverflow.com/questions/11536764/attempted-relative-import-in-non-package-even-with-init-py">this question</a></p>