- 博客(4)
- 问答 (1)
- 收藏
- 关注
原创 python用类,函数删除空文件夹
python用类,函数删除空文件夹# #删除空文件夹import os# def delete_null_dir(path):# if os.path.isdir(path):#如果是一个文件夹# for i in os.listdir(path):#循环遍历该路径下文件夹列表# path_full = os.path.join(path,i)#获取绝对路径# if (os.path.isdir(path_full) =
2020-11-09 14:16:44
126
原创 python类实现爬取百度数据
python类实现爬取百度数据from urllib import requestclass Spider(): #传参数 def __init__(self,url): self.url = url#初始化 #请求 def indexs(self): #发起请求 response = request.urlopen(self.url) #响应信息 self.html = r...
2020-11-09 14:14:37
331
原创 python压缩文件夹
python压缩文件夹#压缩import osimport tarfile#压缩path1 = 'D:\\pycode\\tar\\num1'def text(path): path_list = os.listdir(path)#以列表的形式,检索文件夹下的文件 for i in path_list:#循环遍历列表 full_path=os.path.join(path,i)#获取绝对路径 if os.path.isfile(full_path
2020-11-09 14:11:10
141
转载 python实现一个简易的计算器
python实现一个简易的计算器from tkinter import from tkinter.ttk import *def my_frame(master): w = Frame(master) w.pack(side=TOP,expand=YES,fill=BOTH) return wdef my_Button(master,text,command): w = Button(master,text=text,command=command,width=5
2020-11-09 14:08:50
684
1
空空如也
Djong数据分析遇到的问题,怎么办,找不到路径
2020-07-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人