ulptool icon indicating copy to clipboard operation
ulptool copied to clipboard

Update platform.local.txt to use python2 alias

Open kevinjohna6 opened this issue 4 years ago • 2 comments

Use python2 alias by default. (https://www.python.org/dev/peps/pep-0394/#backwards-compatibility)

kevinjohna6 avatar Sep 07 '20 20:09 kevinjohna6

Hello Kevin,

I don't know if it is useful to keep the Python 2 compatibility. I did try to bring the Python 3 compatibility one or two years ago, but it was far for being ideal (breaking stuff, etc.).

I try to insure the Python 3 compatibility for the moment, but I did not test my code on other platforms, etc.

I did use hints in the code and it makes it incompatible with Python 2. Also the use print(), write() are often the main source of error (byte arrays instead of string, etc.).

Also, I've seen that there is a binutils for the esp32s2... so it's not yet in the recipe.

@kevinjohna6 and @duff2013, my code 'reformatting' is in this zip, if you want to take a look 😄 src.zip

The main changes are speed improvements (faster list and dict declarations, the function calls costing more operations) and full compliance with the PEP8 directives.

Have a nice day,

Vincent

Vincent-Stragier avatar Nov 13 '20 21:11 Vincent-Stragier

I'm planning to drop python 2 support in the future but until then I want it compatible. Maybe this is the solution for now I'll take a look at this sometime soon.

duff2013 avatar Jan 23 '21 19:01 duff2013