摘要: open/文件操作f=open('/tmp/hello','w')#open(路径+文件名,读写模式)#读写模式:r只读,r+读写,w新建(会覆盖原有文件),a追加,b二进制文件.常用模式如:'rb','wb','r+b'等等读写模式的类型有:rU 或 Ua 以读方式打开, 同时提供通用换行符支持 ... 阅读全文
posted @ 2014-09-24 14:27 梦的怒放ing 阅读(217) 评论(0) 推荐(0)
摘要: import Imageimport osimport os.pathimport syspath = sys.argv[1]small_path = (path[:-1] if path[-1]=='/' else path) +'_small'if not os.path.exists(smal... 阅读全文
posted @ 2014-09-24 14:25 梦的怒放ing 阅读(9483) 评论(0) 推荐(0)