# - * - coding: utf-8 - * -
#! The/usr/bin/python
The from docx import Document # write data
The from docx. Shared import Pt # pounds
The from docx. Oxml. Ns import qn # Chinese format
The from docx. Shared import Inches # image size
The import OS
The import sys
The from docx import Document
Fliename=sys. Argv [0] # for current file path, for naming stuffed behind
The document=document () #
new file
27 # # s=need to 10, how much more pictures to how many
# s=int (s)
List1=[' front page ']
List2=[I for I in range (1 d)] # need to increase how much pictures took 100 + 1, how much to zhang
List3=list1 + list2 # structure to fill the image name rules
# # images'='0. JPG is saved in the local picture
For list3 list3 in:
Document. Add_picture (' % s' % (list3) + 'PNG', width=Inches (6), height=Inches (8.3)) # add picture
# # document. Add_page_break () insert page break
Document. Save (' % s.d. ocx '% (fliename 16] [: -)) # save
Saturday can also run, today suddenly an error document. Add_picture (' % s' % (list3) + 'PNG', width=Inches (6), height=Inches (8.3)) the line, why is this so?