Allow input of pathlib2 paths instead of file names

Issue #1064 new
gappleto97 created an issue

pathlib2 is a backported version of pathlib, so that people can use the latest version instead of the one that comes with Python (if it comes with it at all).

At the moment, when you feed it a path from pathlib, both load_workbook and throw errors.

For load_workbook, it is because it calls os.stat, and for, it is because it tries to call the tell() method of the path, which does not exist.

Comments (1)

  1. CharlieC

    How about providing a pull request that does this? I'm not familiar with pathlib and prefer to keep openpyxl's dependencies as simple as possible, ie. by using strings for file names and paths.

  2. Log in to comment