[Python] Where is the text stored in the docx object?

Discussão em 'Python' iniciado por Stack, Junho 9, 2025.

  1. Stack

    Stack Membro Participativo

    Python has a library docx which is used to edit word documents. I read in the document using:

    f = open('foobar.docx')
    document = Document(f)
    f.close()


    From this page on github, I realize the object is an instance of the Document class, which has a parent class ElementProxy. However, I'm unable to find a method which will output the text contained within the document object.

    Continue reading...

Compartilhe esta Página