摘要: #!/usr/bin/python #-*-conding:utf-8-*- #获取目录下文件的绝对路径 import os def getabsroute(path): listdir = os.listdir(path) filepath = os.getcwd() allfile = [] for file in listdir: allf... 阅读全文
posted @ 2017-07-15 13:04 鱼的记忆只有七秒 阅读(5095) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #-*-conding-*- #创建文件,并写入数据:要求不能与现存系统文件重名 import os def makefile(path,content): if os.path.exists(path): if os.path.isdir(path): f = open('makefile_test.txt... 阅读全文
posted @ 2017-07-15 13:03 鱼的记忆只有七秒 阅读(6083) 评论(0) 推荐(0) 编辑
摘要: PIL是Python平台事实上的图像处理标准库,需要用到图片的需要导入该模块 一 安装pip https://pip.pypa.io/en/stable/installing/#id8 二 选择PIL 官方没有支持python3.6的PIL库,所以用pillow代替 http://www.lfd.u 阅读全文
posted @ 2017-07-15 13:02 鱼的记忆只有七秒 阅读(1430) 评论(0) 推荐(0) 编辑
摘要: for i in range(1,10): print( ) for j in range(1,i+1): print('%d*%d=%d '%(i,j,i*j),end="") 1*1=1 2*1=2 2*2=4 3*1=3 3*2=6 3*3=9 4*1=4 4*2=8 4*3=12 4*4=16 5*1=5 5*2=10 5*3=15 5*4=20 5*5=25 6*1=... 阅读全文
posted @ 2017-07-15 12:57 鱼的记忆只有七秒 阅读(242) 评论(0) 推荐(0) 编辑