Support for PathLike objects #1221
VeckoTheGecko
started this conversation in
Ideas
Replies: 1 comment
-
Good suggestion, @VeckoTheGecko! I agree that we should support more pythonic workflows with path lib etc. Would changing the info-message to an f-string as done in PR #1222 fix this? Can you check? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Running the following:
I get the following error.
There are many ways of specifying paths in Python (strings, Path from pathlib and others). I feel that in general supporting these different ways of specifying paths would make parcels more flexible to users and their workflows.
This would be a more "quality of life" change, than a full blown feature. Regardless (as a fan of
pathlib
) I think this addition would be valuable, and would also bringparcels
more in line with other libraries (eg. matplotlib) which support these other ways of specifying paths.This also ties in with idea #1214, as having type annotations would make it clear the support for different parameter types (ie. that
savefile
only supports strings).Beta Was this translation helpful? Give feedback.
All reactions