# Run remote Python script on Gateway

**URL:** <https://forum.inductiveautomation.com/t/run-remote-python-script-on-gateway/82876>\
**Category:** General Discussion\
**Tags:** perspective\
**Created:** [December 8, 2023, 3:45am UTC](https://forum.inductiveautomation.com/t/run-remote-python-script-on-gateway/82876 "2023-12-08T03:45:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [December 8, 2023, 1:05pm UTC](https://forum.inductiveautomation.com/t/run-remote-python-script-on-gateway/82876/6 "2023-12-08T13:05:31Z")

</div>

You're never going to get anything in your `results` variable as `system.util.execute` returns nothing, it will always come back as a `None` - [https://docs.inductiveautomation.com/display/DOC81/system.util.execute?gclid=CjwKCAiAmsurBhBvEiwA6e-WPL18j1xtrRLWguomUD-Gn9jJEjnQ5b8akXKsQH-FiV35aPRM1jAPwRoCmZYQAvD\_BwE](https://docs.inductiveautomation.com/display/DOC81/system.util.execute?gclid=CjwKCAiAmsurBhBvEiwA6e-WPL18j1xtrRLWguomUD-Gn9jJEjnQ5b8akXKsQH-FiV35aPRM1jAPwRoCmZYQAvD_BwE)

`system.util.execute` is fire and forget.

You will have to use a different method to get the result out of your python script most likely ProcessBuilder. There's a few examples on the forum of people doing this you can search for.

It's very possible your python script is running now but you don't think it is because your results are `None`.

> [@Procedure for installing python libraries from source](https://forum.inductiveautomation.com/t/procedure-for-installing-python-libraries-from-source/26022/16):
>
> Oh, right - system.util.execute is a 'fire-and-forget', it doesn't give you access to standard output. Try adapting this: from java.lang import ProcessBuilder, String pb = ProcessBuilder([r"C:\Users\pgriffith\AppData\Local\Microsoft\WindowsApps\python3.exe", r"C:\Users\pgriffith\Downloads\test.py"]) process = pb.start() output = String(process.getInputStream().readAllBytes()) print output (Note: This blocks until the process completes waiting on the input stream. It may or may not ever compl…

---

_[View the full topic](https://forum.inductiveautomation.com/t/run-remote-python-script-on-gateway/82876)._
