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

Should we just rely on the ending to determine the filetype? #156

Open
krystophny opened this issue Dec 10, 2021 · 0 comments
Open

Should we just rely on the ending to determine the filetype? #156

krystophny opened this issue Dec 10, 2021 · 0 comments

Comments

@krystophny
Copy link
Collaborator

Should we just rely on the ending to determine the filetype?
On Linux the ending can be arbitrary (even missing). Do we force the users to use the ending? What if data.in is actually a HDF5? For text based files there are a variety of sensible endings (.txt, .csv, .tsv)...

  1. Using python-magic or calling file via the OS we could determine the input file type from the file header. (only on Linux though I think)

  2. We could just try all filetypes until the first success.

  3. We could add a config option for the filetype (also a good idea in addition to 1 or 2)

For saving only option 3 would be possible (unless the file already exists, but we don't want to overwrite it anyways?)

Originally posted by @Rykath in #153 (comment)

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

1 participant