I have a program exp.py which provides a yes/no result. I want to know how to run the script for multiple PDF and capture the output.
example input: xyz.pdf, abc.pdf, mno.pdf ;
1.output:
- xyz yes
- abc no
- mno yes
Please advice.
I have a program exp.py which provides a yes/no result. I want to know how to run the script for multiple PDF and capture the output.
example input: xyz.pdf, abc.pdf, mno.pdf ;
1.output:
Please advice.
$I did some research and found the below solution with Glob library. hope the below $solution helps.
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