Skip to content
Snippets Groups Projects
Commit 55a67969 authored by Florian Obersteiner's avatar Florian Obersteiner
Browse files

allow usage of pathlib.Path as filepath specifier

parent 13d37487
No related branches found
No related tags found
1 merge request!5introduction of pathlib.Path
import datetime
import sys
import pathlib
import collections
import re
import warnings
......@@ -788,7 +789,7 @@ class Dataset:
# read data if f is not None
if f is not None:
if isinstance(f, str):
if isinstance(f, (str, pathlib.Path)):
self.inputFhandle = open(f, 'r')
else:
self.inputFhandle = f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment