I'm a hardware guy, but dabble with firmware as required (mostly C), and this is my first look at anything python related.
I'm working on a project based on this ->
https://github.com/AlexmagToast/LinuxCNC_ArduinoConnectorEverything is working as expected.
The .py script runs on a LinuxCNC machine and communicates with an Arduino via USB, when it receives a message from the Arduino it passes it on to LinuxCNC via the HAL interface.
The .py script requires small tweaks to match the number and nature of the messages to/from the Arduino when the Arduino code is tweaked. All good.
The setup instructions for this scheme get the user to do the following after a change:
sudo chmod +x arduino-connector.py # my understanding is that the +x changes the permissions to make the file executable?
sudo cp arduino-connector.py /usr/bin/ arduino-connector # my understanding is that this just copies the file to /usr/bin and drops the .py extension
My questions:
1) Does marking this as executable compile the script into some sort of binary executable code that is then executed like any other executable file?
1a) If so can I assume that the script runs much faster when marked executable?
2) What's the purpose of dropping the .py extension?