- Notifications You must be signed in to change notification settings
- Fork 144
踩坑小记 #10
Description
2019.7.28
- Python requests post传data要传json而不是dict
- Go项目在github克隆下来的话可以直接clone在gopath里,甚至可以直接用go get这样会方便很多
2019.7.29
- Windows, Linux, Mac会有路径问题,要多使用pathlib
root = Path("../PycharmProject") config_dir = root/Path("config") # 等价于config_dir = os.path.join(root, 'config') print(str(config_dir)) config.files = config_dir.rglob("*.json")
- 读取文件时要加上rb 避免文字格式问题
with open(filename, encoding='utf-8', mode = ‘r') as f: for line in f: print(repr(line))
Metadata
Metadata
Labels
Development
No branches or pull requests

























