摘要: 转载地址:https://www.cnblogs.com/heenhui2016/p/6802122.html Pycharm 安装 autopep8 工具 引言:此处能看到pep8 的详细介绍:https://www.python.org/dev/peps/pep-0008/。是 Style Gu 阅读全文
posted @ 2018-09-14 11:42 黒貓 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 转载地址:http://www.cnblogs.com/jxldjsn/p/6034158.html 四年的时间,一直使用EmEditor编辑器进行Python开发,之前是做面向过程,只需要将一个单独的py文件维护好即可,用着也挺顺手,但是最近在做面向对象的开发,不同的py文件中相互关联较多,感觉单 阅读全文
posted @ 2018-09-14 11:40 黒貓 阅读(9535) 评论(0) 推荐(0) 编辑
摘要: import pyautogui,time # 获取当前屏幕分辨率 print('当前分辨率为:' + str(pyautogui.size())) # 移动鼠标 def moveMouse(): # moveTo 指定位置画一个正方形5次 # moveRel 当前位置画一个正方形5次 for i 阅读全文
posted @ 2018-09-14 11:39 黒貓 阅读(2818) 评论(0) 推荐(0) 编辑
摘要: import docx # 读取docx文档内容 def readWord(): doc = docx.Document('demo.docx') fullText = [] for para in doc.paragraphs: fullText.append(' ' + para.text) p 阅读全文
posted @ 2018-09-14 11:38 黒貓 阅读(762) 评论(0) 推荐(0) 编辑
摘要: import PyPDF2 # 从PDF提取文本 def selectPDF(): pdfFile = open('Python1.pdf','rb') pdfRead = PyPDF2.PdfFileReader(pdfFile) print(pdfRead.numPages) page = pd 阅读全文
posted @ 2018-09-14 11:38 黒貓 阅读(882) 评论(0) 推荐(0) 编辑
摘要: import openpyxl # 读取Excel表格中的数据 def selectExcel(): wb = openpyxl.load_workbook('example.xlsx') sheet = wb.get_sheet_by_name('Sheet1') print(tuple(shee 阅读全文
posted @ 2018-09-14 11:37 黒貓 阅读(284) 评论(0) 推荐(0) 编辑
摘要: def get_csv_data_update(csv_file, col, row): """获取CSV文件 - 自定义版本""" logging.info("-> 开始获取CSV文件内容") with open(csv_file, 'r', encoding='utf-8-sig') as file: reade... 阅读全文
posted @ 2018-09-14 11:36 黒貓 阅读(191) 评论(0) 推荐(0) 编辑