diff --git a/src/fypp.py b/src/fypp.py index c6d0154..e20995d 100755 --- a/src/fypp.py +++ b/src/fypp.py @@ -244,6 +244,9 @@ def parsefile(self, fobj): Args: fobj (str or file): Name of a file or a file like object. ''' + if isinstance(fobj, pathlib.Path): + fobj = str(fobj) + if isinstance(fobj, str): if fobj == STDIN: self._includefile(None, sys.stdin, STDIN, os.getcwd())