Skip to content

Commit

Permalink
Merge pull request #3 from notpeter/pathlib_support
Browse files Browse the repository at this point in the history
Support pathlib paths.
  • Loading branch information
tomchen authored Jul 18, 2024
2 parents 5e8cc22 + 943a4b6 commit 731bc5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bdfparser/bdfparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import re
import io
import pathlib
import warnings
from sys import version_info as python_version

Expand Down Expand Up @@ -88,7 +89,7 @@ def __init__(self, *argv):
l = len(argv)
if l == 1:
arg = argv[0]
if isinstance(arg, str):
if isinstance(arg, str) or isinstance(arg, pathlib.Path):
self.load_file_path(arg)
elif isinstance(arg, io.IOBase):
self.load_file_obj(arg)
Expand Down

0 comments on commit 731bc5d

Please sign in to comment.