- I have a sample '.pyx' file
- Here, certain mmap operation has been done (via C mmap) and the and 'data_len' has been returned
- I want to read from the offset start upto the data_len area, AND dump it to a random file
I am doing this by the following: BUT, getting Syntax error while doing 'write' operation
cdef void *startmmaparea def do_dump() offset= <char *> startmmaparea ... with open('abc.bin','wb') as fdes: fdes.write(offset.read(data_len)) ...
expected to write the mmap content to the file. but getting Syntax error in the 'write' op Can I write the using the read() as I have done above ? - Can anyone help me with what I am doing wrong here ?