# Issue Exec Node

**URL:** <https://discourse.nodered.org/t/issue-exec-node/1833>\
**Category:** General\
**Created:** [26 July 2018 14:30 UTC](https://discourse.nodered.org/t/issue-exec-node/1833 "2018-07-26T14:30:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhoemio](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@Bhoemio](https://discourse.nodered.org/u/Bhoemio)\
**Post date:** [26 July 2018 14:30 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/1 "2018-07-26T14:30:48Z")

</div>

Hi!  
I am using an Exec node to run a python script, this python script has a while that doesn't stop (This while get data from a car), but node-red doens't show data before the loop are finish o/

I am using the option: "while the command is running - spawn mode". I can't use the option: "while the command is complete - exec mode", because it will cause loss of performance.

How can I get data in Node-RED every time the loop runs without having to wait the loop stops (Loop cannot stop)?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 July 2018 14:46 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/2 "2018-07-26T14:46:07Z")

</div>

Did you read the info box that specifically mentions -u option for not buffering python commands ?

---

<div class="post-metadata">

**Author:** ![Bhoemio](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@Bhoemio](https://discourse.nodered.org/u/Bhoemio)\
**Post date:** [26 July 2018 16:47 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/3 "2018-07-26T16:47:56Z")

</div>

Yeahh, but it didn't work for me 😕

Maybe I am doing it wrong:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/65c9ac44f09d5c8325d0187491cf55d41024d8c6.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 July 2018 17:37 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/4 "2018-07-26T17:37:20Z")

</div>

Are you passing -u to your app ? Or the python process ? Looks like the app to me

---

<div class="post-metadata">

**Author:** ![Bhoemio](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@Bhoemio](https://discourse.nodered.org/u/Bhoemio)\
**Post date:** [26 July 2018 18:02 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/5 "2018-07-26T18:02:11Z")

</div>

How can I pass -u to a python process? Sorry, I don't know this 😕

---

<div class="post-metadata">

**Author:** ![Bhoemio](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@Bhoemio](https://discourse.nodered.org/u/Bhoemio)\
**Post date:** [26 July 2018 18:47 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/6 "2018-07-26T18:47:50Z")

</div>

Ok, now it is solved ^^.  
In my python script I use:  
print('RPM',rpmi[0:-23], flush = True)

This is a way to do it: "flush = True", but, now I want to know how to use this "-u" thing, you can teach me?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 July 2018 19:22 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/7 "2018-07-26T19:22:58Z")

</div>

Put the -u after python3 rather that add it to the end

```
python3 -u yourapp.py
```

---

<div class="post-metadata">

**Author:** ![Bhoemio](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@Bhoemio](https://discourse.nodered.org/u/Bhoemio)\
**Post date:** [26 July 2018 19:41 UTC](https://discourse.nodered.org/t/issue-exec-node/1833/8 "2018-07-26T19:41:12Z")

</div>

Ohhh loord, thank you @dceejay !
