# Run execute python file with node red on raspberry pi

**URL:** <https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679>\
**Category:** General\
**Created:** [29 May 2019 19:44 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679 "2019-05-29T19:44:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [29 May 2019 19:44 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/1 "2019-05-29T19:44:14Z")

</div>

How do i open a python file/script from node red on raspberry pi

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 May 2019 20:03 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/2 "2019-05-29T20:03:42Z")

</div>

Open or run? Two different things.

I think that you can run a Python script using a contributed node - check out the flows library.

If you mean open, you need to explain more about what it is that you are trying to achieve.

---

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [29 May 2019 20:07 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/3 "2019-05-29T20:07:27Z")

</div>

oh i got through.. i used the execu node to run the python file i typed python3 index.py.. which allows me to run from terminal... but how can i stop a python file from running using the same execu node

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 May 2019 20:40 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/4 "2019-05-29T20:40:48Z")

</div>

I presume from the question that the python program keeps running if you don't stop it. If you look at the Info tab for the exec node it tells you how to kill the running program by sending the node a message.

---

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [29 May 2019 20:59 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/5 "2019-05-29T20:59:21Z")

</div>

Colin i am having problems using msg.kill object stopping the exec node

---

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [29 May 2019 21:00 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/6 "2019-05-29T21:00:17Z")

</div>

> [@Colin](#):
>
> I presume from the question that the python program keeps running if you don't stop it.

you are correct

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 May 2019 21:25 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/7 "2019-05-29T21:25:07Z")

</div>

> [@Jimjiy](#):
>
> i am having problems using msg.kill object stopping the exec node

Add a debug node set to show the complete message and showing the message you expect to kill it and post what you see in the debug pane.

---

<div class="post-metadata">

**Author:** ![Jimjiy](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@Jimjiy](https://discourse.nodered.org/u/Jimjiy)\
**Post date:** [29 May 2019 21:31 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/8 "2019-05-29T21:31:07Z")

</div>

"" i got that from the top node  
is that enough or do you want the rest of the debug msgs

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 May 2019 06:09 UTC](https://discourse.nodered.org/t/run-execute-python-file-with-node-red-on-raspberry-pi/11679/9 "2019-05-30T06:09:23Z")

</div>

You get what? I don't see anything. We want to see the kill message contents.
