Wondering if there is somewhere a tutorial to describe the essential differences of Easy Script Python 2.7 versus older 1.5?
There is Telit Easy Script in Python 2.7 doc but no side to side comparisson AFAIK.
Language wise there should not be many (if any) issues going to 2.7. You will however be able to write more neat code, for example:
1.5:
a = a + 1
2.7:
a += 1
1.5:
if a is 9:
return "Nine"
else:
return "Not nine"
2.7:
return "Nine" if a is 9 else "Not nine"
In short, you will be able to use modern Python.
Module wise the interpreter used in the 2.7 products is much more complete. You have sockets, threads, time, signal etc. You will get more from the interpreter and it will do what you want faster than 1.5 due to a lot of optimizations in the vanilla interpreter over the years.
The custom modules from telit such as SER and MDM have changed slightly when it comes to the send/receive calls. It was no big deal to adapt to the 2.7 versions, but be aware that you need to tweak your code slightly when reading and writing data, and you might need to add small adaptor functions if you want code which runs on both 1.5 and 2.7. Again, nothing big.
Tack så mycket, Marco!
Thanks a lot Marco, your input did encourage me indeed!
We use cookies to enhance your browsing experience and help us improve our websites. To improve our website, we carefully select third parties that use cookies to allow us to serve specific content and achieve the purposes set out in our cookie policy. For more information on how to make adjustments through your browser to the cookies being used on your device, please click Find Out More link. By closing this banner or continuing to browse our website, you agree to our use of such cookies. FIND OUT MORE
Wondering if there is somewhere a tutorial to describe the essential differences of Easy Script Python 2.7 versus older 1.5?
There is Telit Easy Script in Python 2.7 doc but no side to side comparisson AFAIK.
Language wise there should not be many (if any) issues going to 2.7. You will however be able to write more neat code, for example:
In short, you will be able to use modern Python.
Module wise the interpreter used in the 2.7 products is much more complete. You have sockets, threads, time, signal etc. You will get more from the interpreter and it will do what you want faster than 1.5 due to a lot of optimizations in the vanilla interpreter over the years.
The custom modules from telit such as SER and MDM have changed slightly when it comes to the send/receive calls. It was no big deal to adapt to the 2.7 versions, but be aware that you need to tweak your code slightly when reading and writing data, and you might need to add small adaptor functions if you want code which runs on both 1.5 and 2.7. Again, nothing big.
Tack så mycket, Marco!
Thanks a lot Marco, your input did encourage me indeed!