Python IO
来源:互联网 发布:计算机办公软件培训 编辑:程序博客网 时间:2024/06/06 01:58
Python 读写文件
#!/usr/bin/python3
# files.py by Bill Weinman [http://bw.org/]
# This is an exercise file from Python 3 Essential Training on lynda.com
# Copyright 2010 The BearHeart Group, LLC
def main():
buffsize=5000 #缓冲流大小
#rb 读 binary 模式 r 文本模式 wb 写binary模式 默认读text模式
fin = open('olives.jpg','rb')
fout = open('new.jpg','wb');
buff=fin.read(buffsize)
while len(buff):
fout.write(buff)
print('.',end=' ')
buff=fin.read(buffsize)
print('Done.')
if __name__ == "__main__": main()
0 0
- python IO
- python IO
- Python IO
- python IO
- python IO
- python io
- python IO
- python file io 详解
- <python>文件IO
- Python输入输出(IO)
- python IO编程
- Python学习----IO编程
- Python---IO的使用
- python IO编程
- python 异步IO
- python 异步IO
- Python IO multiplex
- python学习 文件IO
- '新邮件到达前' 和 '新邮件到达后' 类型代理有什么区别
- JSON 介绍(Introducing JSON)
- jquery 获取当前时间
- 黑马程序员——JavaBean内省
- Ubuntu下的配置opencv
- Python IO
- hdu 1051 woodensticks
- iOS Data Storage Guidelines
- 斗地主检测牌型(电脑)
- C++学习笔记34 模版的原理
- vc++ 程序内存泄漏的排查
- POI + freemaker 制作复杂word
- 关于文件编码格式的一点探讨
- cms开发笔记