Python 提高开发效率的内置小工具
# http 文件服务器
# python2.x
python -m SimpleHTTPServer [port]
# python3.x
python3 -m http.server [port]
1
2
3
4
5
2
3
4
5
# 使用Python解压zip压缩包
# python2/python3 通用
# 压缩 file1 file2 将会被压缩到 file.zip
python -m zipfile -c file.zip file1 file2
# 解压 解压缩file.zip 到目录 unzip_dir
python -m zipfile -e file.zip unzip_dir
1
2
3
4
5
6
2
3
4
5
6
# 字符串转换为JSON
# python2/python3 通用
echo '{"name": "DeanWu", "job": "devops", "sex": "male"}' | python -m json.tool
1
2
2
# jupyter notebook
https://jupyter.org/
# JetBrains 免费授权申请
https://zhuanlan.zhihu.com/p/87370573?from_voters_page=true
# Python Anywhere
https://www.pythonanywhere.com/user/deanwu/
上次更新: 2023/03/28, 16:27:19