Recently, I experimented with various APIs for managing MS Word files (now written). For now, I need a simple API for writing python. I tried the win32com module, which turned out to be very reliable with no examples for python online (very little knowledge of VB and C to be able to translate examples from MSDN).
I tried using python-docx, but after installation I get this trace for any docx function.
Traceback (most recent call last):
File "C:\filepath.py", line 9, in <module>
ispit = newdocument()
NameError: name 'newdocument' is not defined
I am having trouble installing lxml by source and using easy_install. He checked the binaries libxlm2 and libxslt. I downloaded them and added paths to the environment, but the installation source or easy_install stopped every time.
Finally, I used the unofficial python extension package from this Link site . The installation was quick and there were no errors at the end.
Is there something I can do to make docx work and are there any python win32com links on the internet? I could not find. (except MSDN (VB not python) and O'Reily Python Programming on win32 )
source
share