python-docx2txt icon indicating copy to clipboard operation
python-docx2txt copied to clipboard

Is there the possibility to pass the entire file instead of the file name in the process() function?

Open Zast996 opened this issue 5 years ago • 1 comments

Zast996 avatar Dec 10 '20 10:12 Zast996

Haven't tried this, but perhaps it's possible using the methods described here:

https://stackoverflow.com/a/38587909/142780

The idea is that you need to create a file-like object from the file contents. This should work if you pass it into process because that in turn calls zipfile.ZileFile which according to the docs does accept a file -like object.

Let us know how you get on, as it sounds like this well be useful 🙂

nmstoker avatar Oct 22 '23 22:10 nmstoker