📚读书笔记:使用python管理系统

type
status
date
slug
summary
tags
category
icon
password

1. Python 学习的几个建议

  • 了解 python3 中,对 python2 已经放弃的语法;
  • 使用 python2,不要使用 python2.7 以前的版本;
  • 使用 python3,不要使用 python3.4 以前的版本;
  • 多了解 python2 的 __future__ 库
  • 同同一份代码,尽量兼容 python2,python3

2. python 的三个基本用法

2.1 开启服务器

py2: python -m SimpleHttpServer
py3: python -m http.server

2.2 格式化json

python -m json.tool "JSON STRING"

2.3 检查库安装

python -c “import paramiko”

3. PIP 的使用技巧

  • pip show flask
  • pip check flask
  • pip fress > requirements.txt
  • pip install -r requirements.txt

4. click 包

用于快速构建带命令行参数的脚本。

5. 求解文件 md5 值

6. 压缩文件库

  • tarfile
  • zipfile
  • shutil

7. 端口扫描

读书笔记:effective python读书笔记:hello小崔的知乎专栏
飞行日志
常用链接
韭菜搞钱
三省吾身
无问东西
知行合一