safe file loading

This commit is contained in:
ari committed 2020-10-30 16:43:11 -04:00
1 parent e8b31ebee0
commit 44ad73a44c
16 files changed
+439 -77

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
from pathlib import Path
from pdfmajor.streambuffer import BufferStream
CURRENT_FOLDER = Path(__file__).parent
all_pdf_files = {
file_path.name: BufferStream(file_path.open("rb"))
for file_path in (CURRENT_FOLDER / "samples" / "pdf").iterdir()
}