发布时间:2019-09-05 07:07:16编辑:auto阅读(2071)
![[Python] word 文档 - zzq635 - 未名](/Public/images/article/picture/2019/09/05/d0ts6T7EoUZ5emkWw2yNI3qJ8FPpRha1.png)
python setup.py install
[疑问]
结果展示#coding=UTF-8 from docx import * def testmakedocument(): relationships = relationshiplist() document = newdocument() body = document.xpath('/w:document/w:body', namespaces=nsprefixes)[0] body.append(heading(u"文件和文件夹服务接口", 1)) body.append(paragraph(u'请求格式')) request_rows = [ ['http method', 'url', u'说明'] , ['POST', 'http://www.163.com', 'B3'] ] body.append(table(request_rows)) body.append(paragraph(u'参数说明')) body.append(paragraph(u'相应内容')) body.append(paragraph(u'示例')) body.append(heading(u"上传文件", 1)) title = u'空间服务器接口说明文档' subject = u'空间服务器接口说明' creator = u'未名' keywords = ['alfresco', 'url', 'json'] coreprops = coreproperties(title=title, subject=subject, creator=creator, keywords=keywords) # Save our document savedocx(document, coreprops, appproperties(), contenttypes(), websettings(), wordrelationships(relationships), u'空间服务器接口说明文档.docx') def testUnit(): testmakedocument() if __name__ == '__main__': testUnit()
[疑问]
上一篇: python中的除法,取整和求模
下一篇: python(函数指针和类函数指针)
51338
50794
41386
38188
32677
29573
28409
23288
23249
21577
1658°
2385°
1991°
1932°
2260°
1964°
2661°
4465°
4294°
3060°