# PiFace\_LCD node - really need help understanding why things are happening

**URL:** https://discourse.nodered.org/t/piface-lcd-node-really-need-help-understanding-why-things-are-happening/30803
**Category:** General
**Created:** [27 July 2020 22:40 UTC](https://discourse.nodered.org/t/piface-lcd-node-really-need-help-understanding-why-things-are-happening/30803 "2020-07-27T22:40:29Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [28 July 2020 09:53 UTC](https://discourse.nodered.org/t/piface-lcd-node-really-need-help-understanding-why-things-are-happening/30803/15 "2020-07-28T09:53:35Z")

</div>

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](https://discourse.nodered.org/t/when-running-python-scripts-how-to-you-set-which-version-of-python-is-being-used/30810/4)

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:

> [@Trying\_to\_learn](#):
>
> `text = msg.payload.replace(" ", "#/@$%");`

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.

---

_[View the full topic](https://discourse.nodered.org/t/piface-lcd-node-really-need-help-understanding-why-things-are-happening/30803)._
