Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

Add ability to create compounds from file-like objects #103

Merged
merged 2 commits into from
Feb 5, 2019

Conversation

WardLT
Copy link
Contributor

@WardLT WardLT commented Jan 29, 2019

This is a simple change that allows Compound objects to be created without needing to have a file on disk. It follows a very similar approach to ase: The function now changes whether user passes a string and, if not, assumes it to be a file object.

I also added a dependency to six for making Python 2 compatibility easier, and a unit test to cover this new functionality.

Copy link
Collaborator

@larsbratholm larsbratholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes looks good. Thanks for the contribution.

@larsbratholm larsbratholm merged commit 50cc6a7 into qmlcode:develop Feb 5, 2019
zaspel pushed a commit to zaspel/qml that referenced this pull request Jul 29, 2019
* Made Compound able to read file-like objects

I added a six dependency to make life easier

* Give Compound a name only if there is a filename
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants