pu369com

上一页 1 2 3 4 5 6 7 8 9 10 ··· 32 下一页

2023年4月12日

Python+selenium点击网页上指定坐标

摘要: from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains def click_locxy(dr, x, y, left_click=True): ''' dr:浏览器 阅读全文

posted @ 2023-04-12 18:39 pu369com 阅读(1006) 评论(0) 推荐(0) 编辑

python一招完美搞定Chromedriver的自动更新问题

摘要: from webdriver_manager.core.utils import get_browser_version_from_os from webdriver_manager.chrome import ChromeDriverManager import requests, re, tim 阅读全文

posted @ 2023-04-12 16:59 pu369com 阅读(480) 评论(0) 推荐(0) 编辑

python 将一个列表分为多个列表 指定分成几个列表 指定列表元素个数

摘要: l = [i for i in range(23)] def split(a, n): k, m = divmod(len(a), n) return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n)) l_split = split(l 阅读全文

posted @ 2023-04-12 10:29 pu369com 阅读(36) 评论(0) 推荐(0) 编辑

2023年4月11日

python中的线程threading.Thread()

摘要: import threading import time def saySorry(i): if int(i)%2==0: time.sleep(3) print("亲爱的,我错了,我能吃饭了吗?", str(i)) if __name__ == "__main__": for i in range 阅读全文

posted @ 2023-04-11 20:41 pu369com 阅读(11) 评论(0) 推荐(0) 编辑

Python queue (队列)

摘要: import threading import time import queue def producer(): count = 1 while 1: q.put('No.%i' % count) print('Producer put No.%i' % count) time.sleep(1) 阅读全文

posted @ 2023-04-11 19:48 pu369com 阅读(14) 评论(0) 推荐(0) 编辑

python——tkinter图形化界面及threading多线程

摘要: # coding:utf-8 from tkinter import * from tkinter.scrolledtext import ScrolledText # 文本滚动条 import threading import time def count(i): for k in range(1 阅读全文

posted @ 2023-04-11 18:36 pu369com 阅读(143) 评论(0) 推荐(0) 编辑

利用pandas 和 ttk.Treeviews制作xlsx视图工具

摘要: import tkinter as tk from tkinter import ttk import pandas as pd import tkinter.messagebox as msgbox def Start(): msgbox.showinfo('提示', 'OK') fp = pd. 阅读全文

posted @ 2023-04-11 18:25 pu369com 阅读(41) 评论(0) 推荐(0) 编辑

pytdx多进程示例

摘要: # encoding=utf-8 import math from pytdx.hq import TdxHq_API import pathlib import multiprocessing as mp from multiprocessing import Pool class myTdx: 阅读全文

posted @ 2023-04-11 15:15 pu369com 阅读(400) 评论(0) 推荐(0) 编辑

2023年3月24日

Python创建包,导入包(入门必读)

摘要: 以下内容节选自http://c.biancheng.net/view/4669.html 详细内容请看原文 《Python包》一节中已经提到,包其实就是文件夹,更确切的说,是一个包含“__init__.py”文件的文件夹。因此,如果我们想手动创建一个包,只需进行以下 2 步操作: 新建一个文件夹,文 阅读全文

posted @ 2023-03-24 12:45 pu369com 阅读(169) 评论(0) 推荐(0) 编辑

2023年3月23日

python 之 click 包,设置命令行参数

摘要: 原文链接:Python Click 学习笔记 Click 是 Flask 的团队 pallets 开发的优秀开源项目,它为命令行工具的开发封装了大量方法,使开发者只需要专注于功能实现。恰好我最近在开发的一个小工具需要在命令行环境下操作,就写个学习笔记。 国际惯例,先来一段 “Hello World” 阅读全文

posted @ 2023-03-23 16:51 pu369com 阅读(174) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 32 下一页

导航