If you have LibreOffice installed
lowriter --invisible --convert-to doc '/your/file.pdf'
If you want to use Python for this:
import os
import subprocess
for top, dirs, files in os.walk('/my/pdf/folder'):
for filename in files:
if filename.endswith('.pdf'):
abspath = os.path.join(top, filename)
subprocess.call('lowriter --invisible --convert-to doc "{}"'
.format(abspath), shell=True)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…