m210.dump does not download all notes

Asked by Zoltán Vörös

I am not quite sure what the problem is, and I was wondering whether there is a way to debug it. Initially, I tried to save notes to RAM from python, but as far as I see, this might not be possible, because the library function m210_dev_download_notes requires a file number. I am sure this could be fooled somehow, but perhaps it is not so important. However, when I tried to save notes to disc from a python session, I realised that not everything is read from the device. If I do this on the command line

m210 dump > fujitsu.pegvf

then the file size is 233802, and all data are transferred. However, if I do this from a python session

>>> import m210
>>> a = open('test.pegvf', 'wb')
>>> m210.dump(a)
>>> a.close()

then the file size is only 233472, and a chunk from the last page seems to be missing. Is there something that I should do in order to get the whole content of the memory? As a temporary measure, I could issue a system call, but I just don't see why that is different. After all, the command line and the python module calls the very same library.

Question information

English Edit question
m210 Edit question
No assignee Edit question
Solved by:
Zoltán Vörös
Last query:
Last reply:
Revision history for this message
a (tuomasjjrasanen) said :

Good question. And I don't know the answer, yet. It has something to do with the file object created by open(), because sys.stdout is working fine, as you also noticed.

Revision history for this message
Zoltán Vörös (zvoros) said :

Dear Tuomas,

Many thanks for looking into this bug! The fix that you have just committed solves the issue.