Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving with pathlib object #102

Closed
wd60622 opened this issue Oct 28, 2021 · 1 comment
Closed

Saving with pathlib object #102

wd60622 opened this issue Oct 28, 2021 · 1 comment

Comments

@wd60622
Copy link
Contributor

wd60622 commented Oct 28, 2021

Would be nice if the save functionality worked with pathlib's PosixPath object.

No python requirements would have to change with pathlib being introduced in python 3.4

Seems like check would go here:

branca/branca/element.py

Lines 162 to 163 in 629ed34

if isinstance(outfile, str) or isinstance(outfile, bytes):
fid = open(outfile, 'wb')

@Conengmo
Copy link
Member

That seems like a simple change, so I'd say a PR is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants