Telit 862 cross compilation of pyo

Hey Everyone,

Sorry to spam the forums!

I have hit another issue with this Telit module, .pyo compilation takes too long so I’m compiling it on my computer and sending it across.

Sometimes this works but sometimes the code wont run, the Telit returns a “ValueError: bad marshal data” error. I can’t see any logic to explain what’s causing it.

I’ve diffed a pyo created by the Telit unit and a pyo created on my computer and there where 3 differences:

  • The checksum at the start

  • All the paths

  • A inexplicable blob of extra stuff at the end

Now I’ve fixed the paths by doing cross compilation via my script instead of the Telit “Compile” context menu but I can’t explain the blob at the end or the seemingly random errors.

If you’re interested here’s the diff after I worked around the path issue:

http://kzar.co.uk/images/telit-pyo-diff.png

Anyone have any idea? Also does anyone know if there’s a newer version of Telit python than TelitPy1.5.2+_v4.1.exe ?

Cheers, Dave.

Hey everyone,

So I did a more thorough check and it turned out there where only two differences.

1.) all \n’s replaced to \r’s

2.) timestamp at beginning was FFFF

The first problem is my fault, GNU Screen was replacing them when it read the file and I didn’t notice. I’ve updated my script to work around that, phew!

The second problem wasn’t really a problem, but what the hey I wrote a patch anyway! https://github.com/kzar/telit-862-pytho … -fix.patch

Oh and Wilhelm checked for me, apparently TelitPy1.5.2+_v4.1.exe is still the latest version.

Cheers, Dave.