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

Add path option in csv2midi #3

Merged
merged 3 commits into from Mar 18, 2019
Merged

Add path option in csv2midi #3

merged 3 commits into from Mar 18, 2019

Conversation

josepdecid
Copy link
Contributor

When converting CSV to MIDI, csv.reader requires a file object. I added the option to pass a file path that can be activated with an extra boolean parameter in order to not break current version behaviour.

@timwedde
Copy link
Owner

Based on the documentation of csv.reader it should also take lists of strings, not just open file objects.
Since this is beta software anyway, I'm not too concerned with keeping the current method parameters as they are, so instead of adding a new parameter I'd rather make the distinction automatic by checking whether the input is a list or file-like object vs a string, which I'd treat as a path.
I've made a fitting commit in 482b9841b7e0044816479228128c7ddb3dff04ec.

@timwedde timwedde merged commit 75d2c2f into timwedde:master Mar 18, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants