[chirp_devel] python2/3 MemoryMap?

Dan Smith
Sun Feb 17 15:04:30 PST 2019


> I'm trying to write a driver that works with both Python 2 and Python 3. It works and passes all tests, but it cannot create a memory savable memory map when it downloads from the radio.
> I can choose MemoryMapBytes, which works in Py3, or  MemoryMap, which is implemented in both but which results in a mmap that cannot be written to a file.  I'm now officially lost, which is my usual state. Any suggestions?

I'm not sure what you mean, so showing code would be a lot more helpful. I've converted a bunch of radios in the py3 branch that work on py2 and py3 at the same time, so you can look for examples there. Most have a first commit that just makes them work with MemoryMap (i.e. compat mode) first, followed by one that makes them byte-clean using MemoryMapBytes. Note that you won't be able to make a driver that works on both on the main branch of course.

--Dan




More information about the chirp_devel mailing list