python
python退出
- exit: os._exit(0) 和 sys.exit(0)
- https://www.cnblogs.com/dll26/p/8016749.html
python调用系统命令
json
- python json.loads()操作,多用 get 操作
- json.loads('"aaa"') 不会挂;json.loads('aaa') 会挂
- https://www.cnblogs.com/bigtreei/p/10466518.html
join
- '\t'.join(map(str, [1, 2, 3]))
python搭建http服务
- python -c 执行单行命令/脚本
python -c 'import SimpleHTTPServer as s; s.test()' [可指定port,默认8000]
wget ip:port/file
wget ip:port/file
传输文件加参数 -r
wget -r --no-parent ip:port/
- python -m SimpleHTTPServer 8000
- nohup python -m SimpleHTTPServer 8000 &
python 编码
- https://www.cnblogs.com/f-ck-need-u/p/10185965.html
- https://blog.csdn.net/lyb3b3b/article/details/74993327
- https://www.shangyang.me/2017/07/04/python-syntax-2-encode-and-decode/
- https://www.liaoxuefeng.com/wiki/1016959663602400/1017075323632896
- https://zhuanlan.zhihu.com/p/37359861
- http://kuanghy.github.io/2016/10/15/encoding-python2-vs-python3
python protobuf
- https://www.freecodecamp.org/news/googles-protocol-buffers-in-python/
- https://www.jianshu.com/p/1aeb8ee87b99