Replies: 3 comments
-
彩色日志库:poetry add loguru
pip install loguru |
Beta Was this translation helpful? Give feedback.
0 replies
-
python import local module/library:
from pathlib import Path
import sys
path_root = Path(__file__).parents[2]
sys.path.append(str(path_root))
print(sys.path)
import src.c.d
~/Documents/code/project$ python3 -m src.a.b # note that we use . and not / here
Name: __main__
Package: src.a
export PYTHONPATH=/home/user/my_libs
python myscript.py
import sys
sys.path.insert(0, '') |
Beta Was this translation helpful? Give feedback.
0 replies
-
python 工具链:poetry |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
python 必知必会:
pkg_resources
setuptools
内的模块, 用于处理目录解析等, 非常方便.Beta Was this translation helpful? Give feedback.
All reactions