Skip to content

Commit 731bc5d

Browse files
authored
Merge pull request #3 from notpeter/pathlib_support
Support pathlib paths.
2 parents 5e8cc22 + 943a4b6 commit 731bc5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bdfparser/bdfparser.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import re
77
import io
8+
import pathlib
89
import warnings
910
from sys import version_info as python_version
1011

@@ -88,7 +89,7 @@ def __init__(self, *argv):
8889
l = len(argv)
8990
if l == 1:
9091
arg = argv[0]
91-
if isinstance(arg, str):
92+
if isinstance(arg, str) or isinstance(arg, pathlib.Path):
9293
self.load_file_path(arg)
9394
elif isinstance(arg, io.IOBase):
9495
self.load_file_obj(arg)

0 commit comments

Comments
 (0)