摘要: 1 from aip import AipSpeech 2 import pygame #两个都可以用来播放 3 """ 你的 APPID AK SK """ 4 5 APP_ID = '' 6 API_KEY = '' 7 SECRET_KEY = '' 8 9 client = AipSpeec 阅读全文
posted @ 2020-06-09 20:27 马蹄哒哒 阅读(179) 评论(0) 推荐(0)
摘要: 1 import pdfplumber 2 3 pdf=pdfplumber.open(',,,,,,,.pdf') 4 5 first_page=pdf.pages[0] 6 7 print(first_page.extract_text()) #打印第一页内容 8 9 10 11 #提取其中的表 阅读全文
posted @ 2020-06-09 20:25 马蹄哒哒 阅读(332) 评论(0) 推荐(0)
摘要: 1 from pptx import Presentation 2 3 prs=Presentation('名字.pptx') 4 5 for slide in prs.slides: # 读取每一页幻灯片 6 7 for shape in slide.shapes: #获取每一页的内容 8 9 i 阅读全文
posted @ 2020-06-09 20:24 马蹄哒哒 阅读(102) 评论(0) 推荐(0)
摘要: 1 from docx import Document 2 3 word=Document() 4 5 word.add_heading('一级标题',level=1) #增加一级标题 6 7 p1=word.add_paragraph('这是第一段') 8 9 p2=word.add_paragr 阅读全文
posted @ 2020-06-09 20:22 马蹄哒哒 阅读(179) 评论(0) 推荐(0)
摘要: 1 from docx import Document 2 3 word=Document(',,,,,,.docx') 4 5 paragraphs=word.paragraphs #返回一个列表,有多少段就有多少个值 6 7 for i in paragraphs: 8 9 print(i.te 阅读全文
posted @ 2020-06-09 20:20 马蹄哒哒 阅读(298) 评论(0) 推荐(0)
摘要: 1 from docx import Document 2 3 word =Document(r'表格名称.docx') 4 5 #读取表格 6 7 tables=word.tables 8 9 for i in tables[:]: 10 11 for j,row in enumerate(i.r 阅读全文
posted @ 2020-06-09 20:18 马蹄哒哒 阅读(208) 评论(0) 推荐(0)
摘要: 1 from turtle import * 2 bgcolor('red') 3 setup(800,500) 4 5 a={(-126,162):65,(-58,55):65,(-58,-48):65,(-126,-162):65,(-300,50):120} 6 def start(tuple 阅读全文
posted @ 2020-06-09 20:05 马蹄哒哒 阅读(85) 评论(0) 推荐(0)
摘要: 1 >>>from openpyxl.utils import get_column_letter,column_index_from string 2 3 >>>get_column_letter(2) 4 5 B 6 7 >>>column_index_from_string('B') 8 9 阅读全文
posted @ 2020-06-09 20:03 马蹄哒哒 阅读(302) 评论(0) 推荐(0)
摘要: 1 from openpyxl.styles import Font 2 3 from openpyxl import load_workbook 4 5 excel=load_workbook(r'文件名.xlsx') 6 7 sheet=excel.active 8 9 font=Font(na 阅读全文
posted @ 2020-06-09 20:02 马蹄哒哒 阅读(4469) 评论(0) 推荐(0)
摘要: -- 创建数据库 create database 数据库名 default charset =utf8; -- 创建表 create table 表名 ( id int,name char(20)); create table 表名 (id int null/not null,name char(2 阅读全文
posted @ 2020-06-09 20:00 马蹄哒哒 阅读(72) 评论(0) 推荐(0)