🍾 Xarray is now 10 years old! 🎉

xarray.backends.DummyFileManager.acquire_context

xarray.backends.DummyFileManager.acquire_context#

DummyFileManager.acquire_context(needs_lock=True)[source]#

Context manager for acquiring a file. Yields a file object.

The context manager unwinds any actions taken as part of acquisition (i.e., removes it from any cache) if an exception is raised from the context. It does not automatically close the file.