摘要:
1 import os 2 import stat 3 4 def remove_readonly(func,path): #定义回调函数 5 os.chmod(path,stat.S_IWRITE) #删除文件的只读文件 6 func(path) #在次调用刚刚失败的函数 7 8 def del_dir(path,onerror=None)... 阅读全文
posted @ 2017-06-20 13:50
JustLittle
阅读(965)
评论(0)
推荐(0)
摘要:
1 from zipfile import ZipFile 2 from os import listdir 3 from os.path import isfile,isdir,join 4 5 def addFileIntoZipfile(srcDir,fp): 6 for subpath in listdir(srcDir): 7 subpath=j... 阅读全文
posted @ 2017-06-20 08:57
JustLittle
阅读(3033)
评论(0)
推荐(0)
摘要:
1 #docx文档题库包含很多段,每段一个题目,格式为:问题。(答案) 2 #数据库datase.db中tiku表包含kechengmingcheng、zhanngji、timu、daan四个字段 3 import sqlite3 4 from docx import Document 5 6 doc = Document('《Python程序设计》题库.docx') 7 8... 阅读全文
posted @ 2017-06-20 08:14
JustLittle
阅读(765)
评论(0)
推荐(0)

浙公网安备 33010602011771号