duff2013 / ulptool

Program the esp32 ULP coprocessor in Arduino
278 stars 69 forks source link

Update platform.local.txt to use python2 alias #64

Open kevinjohna6 opened 4 years ago

kevinjohna6 commented 4 years ago

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

Vincent-Stragier commented 4 years ago

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

duff2013 commented 3 years ago

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.