ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 74 forks source link

mdf file is not closed at the end #108

Closed aqkfatmtvvfb closed 6 years ago

aqkfatmtvvfb commented 6 years ago

in my python program, i use "yop = mdfreader.mdf(file_path)" to obtain comment, then i want to rename the file, but i met an error "[WinError 32] The process cannot access the file because it is being used by another process".

i think "self.fid.close()" should be added at line 413 in file mdfreader.py.

ratal commented 6 years ago

Thanks for the proposal, I will implement it. If you only want to acces comments and not load the data, it would be more efficient to use mdfinfo class instead or the argument noDataLoading = True for read.