上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: import time#系统客户端import win32com.clientdehua = win32com.client.Dispatch("SAPI.SPVOICE")while 1: dehua.Speak("sunck is a handsome man") time.sleep(5) 阅读全文
posted @ 2020-02-07 21:27 i勤能补拙 阅读(363) 评论(0) 推荐(0) 编辑
摘要: #进程模块import win32processimport win32conimport win32guiimport win32apiimport ctypesPROCESS_ALL_ACCESS = (0x000F0000|0x00100000|0xFFF)#找窗体win = win32gui 阅读全文
posted @ 2020-02-07 21:25 i勤能补拙 阅读(1806) 评论(0) 推荐(0) 编辑
摘要: import win32conimport win32guiimport timeimport randomQQWin = win32gui.FindWindow("TXGuiFoundation", "QQ")#参数1:控制的窗体#参数2:大致方位,HWND_TOPMOST上方#参数3:位置x#参 阅读全文
posted @ 2020-02-07 21:21 i勤能补拙 阅读(6455) 评论(0) 推荐(1) 编辑
摘要: import win32conimport win32guiimport time#找出窗体的编号#QQWin = win32gui.FindWindow("TXGuiFoundation", "QQ")#隐藏窗体#win32gui.ShowWindow(QQWin, win32con.SW_HID 阅读全文
posted @ 2020-02-07 20:48 i勤能补拙 阅读(2121) 评论(0) 推荐(0) 编辑
摘要: import os'''os:包含了普遍的操作系统的功能'''#获取操作系统类型 nt->windows posix->Linux、Unix或Mac OS Xprint(os.name)#打印操作系统详细的信息(windows不支持)#print(os.uname())'''posix.uname_ 阅读全文
posted @ 2020-02-06 17:20 i勤能补拙 阅读(294) 评论(0) 推荐(0) 编辑
摘要: import pickle #数据持久性模块myList = (1,2,3,4,5,"sunck is a good man")path = r"C:\Users\xlg\Desktop\Python-1704\day08\1-文件读写\file6.txt"f = open(path, "wb")p 阅读全文
posted @ 2020-02-06 17:15 i勤能补拙 阅读(176) 评论(0) 推荐(0) 编辑
摘要: #编码path = r"C:\Users\xlg\Desktop\Python-1704\day08\1-文件读写\file5.txt"with open(path, "wb") as f1: str = "sunck is a good man凯" f1.write(str.encode("utf 阅读全文
posted @ 2020-02-06 17:13 i勤能补拙 阅读(203) 评论(0) 推荐(0) 编辑
摘要: import timepath = r"C:\Users\xlg\Desktop\Python-1704\day08\1-文件读写\file2.txt"f = open(path, "a")#写文件#1、将信息写入缓冲区f.write("sunck in")#2、刷新缓冲区#直接把内部缓冲区的数据立 阅读全文
posted @ 2020-02-06 16:40 i勤能补拙 阅读(225) 评论(0) 推荐(0) 编辑
摘要: '''过程:1、打开文件2、读文件内容3、关闭文件''''''1、打开文件open(path, flag[, encoding][, errors])path:要打开文件的路径flag:打开方式r 以只读的方式打开文件,文件的描述符放在文件的开头rb 以二进制格式打开一个文件用于只读,文件的描述符放 阅读全文
posted @ 2020-02-05 21:24 i勤能补拙 阅读(297) 评论(0) 推荐(0) 编辑
摘要: ''''''#print(3 / 0)#需求:当程序遇到问题时不让程序结束,而越过错误继续向下执行'''try……except……else格式:try: 语句texcept 错误码 as e: 语句1except 错误码 as e: 语句2……except 错误码 as e: 语句nelse: 语句 阅读全文
posted @ 2020-02-05 21:20 i勤能补拙 阅读(259) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页