Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个程序 exp.py 提供是/否结果。我想知道如何为多个 PDF 运行脚本并捕获输出。
示例输入:xyz.pdf、abc.pdf、mno.pdf;
1.输出:
请指教。
$我做了一些研究,并找到了 Glob 库的以下解决方案。希望下面的$解决方案有所帮助。
path = "C:/Users/documents/*.*" i=0 for file in glob.glob(path): pdf_file = fitz.open(file) print(glob.glob(os.path.basename(path))[i]) i=i+1