python
alex shaw
这个作者很懒,什么都没留下…
展开
-
python读取任意文件rb模式
主要是加密和解密的需要需要读取***txt, pdf, ppt, doc***等任意形式文件So, 传统的使用r, encoding='utf-8’不在适用最后只能采用 mode=‘rb’但是如何 存储和恢复成为了问题最后寻得的方法是file.write((word).to_bytes(length=1, byteorder=‘big’))能够很好的解决问题在这里插入代码片`...原创 2020-04-24 13:00:45 · 2234 阅读 · 0 评论 -
pip基本操作
这里写自定义目录标题python的注意事项#PIP升级python -m pip install --upgrade pip#PIP卸载python -m pip uninstall pip#PIP更换软件源临时:eg: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple国内源: 阿里云 https://...原创 2020-04-15 14:46:45 · 186 阅读 · 0 评论