上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 在实际的业务开发中会经常遇到对文件进行相关的操作,比如新建文件夹或文件,移动、删除文件夹或文件,文件的压缩与解压缩等等!!下面就其中的压缩与解压缩进行代码演示! 文件解压缩 def unzip_file(dir_path): # 解压缩后文件的存放路径 unzip_file_path = r"C:\ 阅读全文
posted @ 2021-06-11 08:43 拷贝达人 阅读(235) 评论(0) 推荐(0) 编辑
摘要: @%windir%\System32\tscon.exe 0 /dest:console@%windir%\System32\tscon.exe 1 /dest:console@%windir%\System32\tscon.exe 2 /dest:console 2.关机失效的解决方案: 远程桌面 阅读全文
posted @ 2021-06-03 12:02 拷贝达人 阅读(706) 评论(0) 推荐(0) 编辑
摘要: python判断文件和文件夹是否存在、创建文件夹 >>> import os >>> os.path.exists('d:/assist') True >>> os.path.exists('d:/assist/getTeacherList.py') True >>> os.path.isfile( 阅读全文
posted @ 2021-05-31 16:56 拷贝达人 阅读(896) 评论(0) 推荐(0) 编辑
摘要: import fitz import os import datetime from PyPDF2 import PdfFileReader, PdfFileWriter # 导入相关的库 from PIL import Image import shutil class PDF(): def pd 阅读全文
posted @ 2021-05-31 16:54 拷贝达人 阅读(102) 评论(0) 推荐(0) 编辑
摘要: selenium+python配置chrome浏览器的选项 1. 背景 在使用selenium浏览器渲染技术,爬取网站信息时,默认情况下就是一个普通的纯净的chrome浏览器,而我们平时在使用浏览器时,经常就添加一些插件,扩展,代理之类的应用。相对应的,当我们用chrome浏览器爬取网站时,可能需要 阅读全文
posted @ 2021-05-17 11:45 拷贝达人 阅读(2333) 评论(0) 推荐(0) 编辑
摘要: #pyperclip模块中的copy() paste()可以向计算机的剪贴板发送文本,或从它接受文本。# 将程序的输出发送到剪贴板,使它容易粘贴到邮件,文字处理程序或者其他软件中import pyperclip #把hello world 复制到计算机的剪切板pyperclip.copy('hell 阅读全文
posted @ 2021-05-17 11:23 拷贝达人 阅读(1516) 评论(0) 推荐(1) 编辑
摘要: os模块下有两个函数: os.walk() os.listdir() # -*- coding: utf-8 -*- import os def file_name(file_dir): for root, dirs, files in os.walk(file_dir): print(root) 阅读全文
posted @ 2021-05-13 23:16 拷贝达人 阅读(3249) 评论(0) 推荐(0) 编辑
摘要: sorted 语法: sorted(iterable, key=None, reverse=False) 参数说明: iterable -- 可迭代对象。 key -- 主要是用来进行比较的元素,只有一个参数,具体的函数的参数就是取自于可迭代对象中,指定可迭代对象中的一个元素来进行排序。 rever 阅读全文
posted @ 2021-05-11 15:28 拷贝达人 阅读(3091) 评论(0) 推荐(1) 编辑
摘要: # 设置长 document.getElementsByClassName('currencytables__TableScroller-xlq26m-1 eLRiRK')[0].style.maxHeight = '15000px' # 设置宽 document.getElementsByClas 阅读全文
posted @ 2021-05-07 12:44 拷贝达人 阅读(47) 评论(0) 推荐(0) 编辑
摘要: # 键盘全选操作from selenium.webdriver.common.keys import Keysdriver.find_element_by_css_selector('#key-demo').send_keys(Keys.CONTROL,'a')time.sleep(2)# 键盘的复 阅读全文
posted @ 2021-05-06 10:24 拷贝达人 阅读(935) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页