Closed oridatt closed 1 year ago
This is the expected behavior; in the underlying idelib
package, IDE files are read dynamically (lazy loaded), so they remain open.
There are two solutions: either explicitly close the files with the method Dataset.close()
after using the file, or use a with
context block. An example of the latter:
import endaq
with endaq.ide.files.get_doc('myfile.ide') as doc:
print(doc.closed) # "False"
ct = endaq.ide.info.get_channel_table(doc)
print(doc.closed) # "True"
I used the library to read several ide files. I then found these files were still "in use" after my script had completed.