随笔分类 - python 学习笔记
摘要:import osif 'chromedriver' in os.popen('tasklist /FI "IMAGENAME eq chromedriver.exe"').read(): os.system('TASKKILL /F /IM chromedriver.exe')else: prin
阅读全文
摘要:'''打印方式一''' # import os# file= '文件' # os.startfile(file,'print') '''打印方式二''' import xlwings as xw app = xw.App(visible=False, add_book=False)app.displ
阅读全文
摘要:import numpy as np #使用np模块 np.set_printoptions(suppress=True) #此行代码表示 取消用科学计算法表示 #第一种相加方式 a=['34','34'] c=[345,3,456] b=[345,3,4] c = np.array(c) + np
阅读全文
摘要:安装步骤: https://www.jianshu.com/p/0af0a216e43d 汉化文件: https://www.lanzous.com/ia8y8fa 汉化文件复制到translations文件夹
阅读全文
摘要:'''隐藏Chrome浏览器的界面操作''' from selenium.webdriver.chrome.options import Options chrome_options =Options()chrome_options.add_argument('--headless')browser
阅读全文
摘要:1、鼠标操作 from pymouse import PyMouse myMouse = PyMouse() #获取当前的鼠标位置 # nowP = myMouse.position() # print(nowP) #鼠标移动到坐标(x,y)处 myMouse.move(300,600) time.
阅读全文
摘要:1、ShellExecute函数 import win32api win32api.ShellExecute(0, 'open', 'notepad.exe', '', '', 0) # 后台执行 win32api.ShellExecute(0, 'open', 'notepad.exe', '',
阅读全文
摘要:from ctypes import * user32 = windll.LoadLibrary('user32.dll')#调用dll文件 #a是得到弹出框的选择按钮的值 user32.MessageBoxA(0显示弹出框,显示消息内容,弹出框标题内容,0-6个选择) #乱码要添加编码格式 .de
阅读全文
摘要:1、打开Pycharm。2、打开Terminal(快捷键Alt + F12) 3、安装pyinstaller工具输入:pip install pyinstaller4、生成本项目可执行文件Terminal中输入: pyinstaller -F -w main.py main.py是我的项目启动文件名
阅读全文

浙公网安备 33010602011771号