PiFace_LCD node - really need help understanding why things are happening

To @krambriw, please see this response as well: When running Python scripts, how to you set which version of Python is being used? - #4 by afelix

I read through the source code of this node earlier, both the python code as well as the JavaScript, and I can’t say I’m impressed by the code quality or how hardcoded the hacks are that make it work. Like the following line:

It’s giving me the shivers. The author of the node appears to not know of a better way to pass an argument containing spaces to a python program, so they replace every space with "#/@$%" on the JavaScript side, then on the python side replace it back with a space.
Since the script is using python2 hardcoded and I haven’t seen any special code, I’m pretty sure it’s also going to crash if you try adding unicode characters, something as simple as a ça va in your text might crash the script/node.

1 Like