Tag Archives: The editor

Python modifies word document content and inserts pictures

The following code

#!/usr/bin/python
# coding:utf-8
import docx
def main():
    filepath = 'test.docx'
    filepath1 = 'wtest.docx'
    newdocx = docx.Document(filepath)
    table = newdocx.tables
    for oTable in table:
        rows_num = len(oTable.rows)
        columns_num = len(oTable.columns)
        cell = oTable.cell(3, 0)
        # cell.add_paragraph("a")
        cell.text = ""
        cell.paragraphs[-1].runs[0].add_picture('t1.jpg')
        print(rows_num)
        print(columns_num)
        newdocx.save(filepath1)
if __name__ == '__main__':
    main()

Visual studio 2017 experience

On March 7, 2017, Microsoft released the 20th official version of Visual Studio — VS2017. I also can’t wait, the first time to download and install the community version, after all, this is the first IDE in the universe ah, on the VS2017 relative to the VS2015 improvement overview, please move to open source China, here to say that I as C++ installation and use experience.
Install the feeling
Installation interface for personal depth customization
About the installer
VS2017 has a new installation logic and steps, I use the way of network installation. VS2017 uses a separate installer to download and install VS components. The first installer downloaded from the official website is very small, with a space footprint of only 0.99M. (This is a real thing, the MS VS team must know that I have poor C disk space!) .

but this is not the real installer, real installer is needed by this small program to download and install, and then you can use. Installer volume……

wnload quickly, after the completion of the installation will automatically install the system under the C disk, and open the VS2017 installation version selection interface, I installed the VS2017 community version, enough to use, the focus is personal use does not spend money on the legal version.

Modular customization
Choose a good version, load for a while will enter the VS2017 module selection interface, the overall feeling is very refreshing, customization is very simple, you can choose a large module, such as.NET desktop development, or C++ development, or Windows development and so on, see the picture by yourself… . (I haven’t chosen any here, only the core editor, which takes up only 764MB of space! Heaven and earth conscience! ╮ (╯ del ╰) ╭)

in choosing a good big modules, also can undertake the choice of a single component, it is important to note that between components are interdependent, and some of the dependence between components is mandatory, some of it is not mandatory, for C disk will be lost comrades, Suggestions can seriously customization, unnecessary, or can be configured after installation, don’t need to use the installer installed, like a Win10 SDK is likely to be the hard disk C; For cross-platform development using VS, such as Android development, develop the required suite (JDK, NDK, SDK, Ant…) Basic can be installed after VS to configure, after all, it takes time to download, and the general VS installation path will be placed in the default C disk, so the VS components you choose will be installed C disk by default!


the installer can be directly the optional language pack, it’s a fine details of the changes, I personally before I hope I can a installation on English language and Chinese language pack, every time is to the other from the website to download the language pack, feel quite troublesome.

ah