-
Notifications
You must be signed in to change notification settings - Fork 8
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
Is it possible to read from io.BytesIO? #19
Comments
Hi, Sorry, the open only works with actual file paths. As this project is merely wrapping the ND2 reading library from Nikon, we don’t have much control. You could try virtual file systems if you want to stay in memory, but it depends on your OS how that works. I don’t have experience with that. Or, try a pure Python alternative like https://github.com/rbnvrw/nd2reader |
Thank you! What is the approach with virtual file system? |
@caspervdw I have created a temporal file in /dev/shm from which nd2reader read contents. However, after clossing reader, and deleting temporal file. It is still there. So I think your library closes bad the file. Do you maintain any reference inside it? |
@caspervdw There's more context in PyFilesystem/pyfilesystem2#402 (comment) |
Right! |
Hi, pims_nd2/pims_nd2/nd2reader.py Line 173 in 00acf8c
|
I am going to use this util in Flask backend. However, I would like to use pims_nd2 in io.BytesIO.
Is it possible? Or should I save file locally?
The text was updated successfully, but these errors were encountered: