随笔分类 -  python

摘要:查看chrome安装目录:C:\Users\***\AppData\Local\Google\Chrome\Application 命令行进入安装目录执行:chrome.exe --remote-debugging-port=9180 --user-data-dir="D:\selenum_temp 阅读全文
posted @ 2022-04-01 16:34 CrossPython 阅读(426) 评论(0) 推荐(0)
摘要:import win32com.clientscheduler = win32com.client.Dispatch('Schedule.Service')scheduler.Connect()folders = scheduler.GetFolder('\\')task = folders.Get 阅读全文
posted @ 2022-03-27 09:56 CrossPython 阅读(67) 评论(0) 推荐(0)
摘要:Python check for Completed and failed Task Windows scheduler 有谁知道我可以查看的方式或资源来检查任务计划程序中所有Windows任务的状态? 我想看看是否看到任务失败或成功。 我想在Python中做到这一点。 我已经看过一些使用win32 阅读全文
posted @ 2022-03-26 22:50 CrossPython 阅读(602) 评论(0) 推荐(0)
摘要:import win32com.client computer_name = "" #leave all blank for current computer, current usercomputer_username = ""computer_userdomain = ""computer_pa 阅读全文
posted @ 2022-03-26 22:49 CrossPython 阅读(348) 评论(0) 推荐(0)
摘要:session.auth = HttpNtlmAuth(self.credential, self.password, session) from requests_ntlm import HttpNtlmAuth a = requests.get(url=url, data=data, heade 阅读全文
posted @ 2022-03-26 11:04 CrossPython 阅读(71) 评论(0) 推荐(0)
摘要:import poplib import sys from importlib import reload from email.parser import Parser from email.parser import BytesParser from email.header import de 阅读全文
posted @ 2022-03-23 23:21 CrossPython 阅读(44) 评论(0) 推荐(0)
摘要:合体. 阅读全文
posted @ 2022-03-22 09:50 CrossPython 阅读(64) 评论(0) 推荐(0)
摘要:from pdfminer.pdfparser import PDFParser from pdfminer.pdfparser import PDFParser,PDFDocument from pdfminer.pdfinterp import PDFResourceManager, PDFPa 阅读全文
posted @ 2022-03-04 11:39 CrossPython 阅读(109) 评论(0) 推荐(0)
摘要:select * from sqlserver, convert(date, 23) => YYYY-MM-DD pandas convert to date, drop time part, df2['ym1'] = pd.to_datetime(df2['ym']).dt.date 阅读全文
posted @ 2022-02-28 17:06 CrossPython 阅读(39) 评论(0) 推荐(0)
摘要:good 阅读全文
posted @ 2022-02-08 21:25 CrossPython 阅读(38) 评论(0) 推荐(0)
摘要:address_book = ['receiver@test.cn'] msg = MIMEMultipart() sender = 'sender@sender.cn' subject = "My subject2222222222222" body = "This is my email bod 阅读全文
posted @ 2022-01-27 18:48 CrossPython 阅读(34) 评论(0) 推荐(0)
摘要:from exchangelib import DELEGATE, Account, Credentials, Message, Mailbox, HTMLBody def Email(to, subject, body): creds = Credentials( username='a@live 阅读全文
posted @ 2022-01-13 08:52 CrossPython 阅读(96) 评论(0) 推荐(0)
摘要:views.py中:定义一个global_settings函数,先把全局变量都引入过来,然后再返回:def global_setting(request):#注意有request参数 SITE_DESC = settings.SITE_DESC SITE_NAME = settings.SITE_N 阅读全文
posted @ 2021-09-28 17:42 CrossPython 阅读(164) 评论(0) 推荐(0)
摘要:conn = ... charset='cp936' 阅读全文
posted @ 2021-09-13 09:45 CrossPython 阅读(212) 评论(1) 推荐(1)
摘要:import win32com.client as win32 import pythoncom pythoncom.CoInitialize() def send_mail(**kwargs): outlook = win32.Dispatch('Outlook.Application') rec 阅读全文
posted @ 2021-08-24 18:22 CrossPython 阅读(128) 评论(0) 推荐(0)
摘要:string .encode("utf-8").decode("latin1") 阅读全文
posted @ 2021-08-18 11:28 CrossPython 阅读(1338) 评论(0) 推荐(0)
摘要:import itertools def twentyfour(cards): '''史上最短计算24点代码''' results = [] for nums in itertools.permutations(cards): # 四个数 for ops in itertools.product(' 阅读全文
posted @ 2021-08-01 20:21 CrossPython 阅读(114) 评论(0) 推荐(0)
摘要:import pyautoguifrom pynput.keyboard import Listenerimport logging# 反复执行:win + r和esc 20次# i = 0# while i<20:# pyautogui.hotkey('win', 'r')# pyautogui. 阅读全文
posted @ 2021-02-06 16:00 CrossPython 阅读(500) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*-import win32com.clientimport os#剪切板import win32clipboard as wcimport win32conexcel = win32com.client.Dispatch('Excel.Applicatio 阅读全文
posted @ 2021-02-06 15:04 CrossPython 阅读(202) 评论(0) 推荐(0)
摘要:1 IO的含义 在计算机中,IO是Input/Output的简写,也就是输入和输出。 由于程序和运行时数据是在内存中驻留,由CPU这个超快的计算核心来执行,涉及到数据交换的地方,通常是磁盘、网络等,就需要IO接口。 比如你访问百度首页,浏览器就需要通过网络IO获取网页。浏览器先会发送请求给百度服务器 阅读全文
posted @ 2019-03-08 20:16 CrossPython 阅读(3246) 评论(0) 推荐(0)