# Executing Python script from outside the editor?

**URL:** <https://forums.unrealengine.com/t/executing-python-script-from-outside-the-editor/686226>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, question\
**Created:** [November 7, 2022, 11:53pm UTC](https://forums.unrealengine.com/t/executing-python-script-from-outside-the-editor/686226 "2022-11-07T23:53:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benski191](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Benski191](https://forums.unrealengine.com/u/Benski191)\
**Post date:** [November 7, 2022, 11:53pm UTC](https://forums.unrealengine.com/t/executing-python-script-from-outside-the-editor/686226/1 "2022-11-07T23:53:57Z")

</div>

I am making an automation pipeline and am running into some difficulties communicating with UE’s python environment from an external tool. According to this [documentation](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/ScriptingAndAutomation/Python/) you can run a python script from the command line. However, it only runs a single script and then exists the editor. I want to be able to run a script in the currently opened project by triggering the script in an custom external tool. Because Unreal has a separate python interpreter, this has proved to be a challenge. Any insight would be helpful! Thank you in advance! 🙂

---

<div class="post-metadata">

**Author:** ![eDuderino](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eduderino/32/550169_2.png) [@eDuderino](https://forums.unrealengine.com/u/eDuderino)\
**Post date:** [March 3, 2023, 2:35pm UTC](https://forums.unrealengine.com/t/executing-python-script-from-outside-the-editor/686226/2 "2023-03-03T14:35:23Z")

</div>

Hi there,

did you figure this out? Trying to solve this issue as well.

---

<div class="post-metadata">

**Author:** ![Zakkar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zakkar](https://forums.unrealengine.com/u/Zakkar)\
**Post date:** [June 3, 2025, 6:33pm UTC](https://forums.unrealengine.com/t/executing-python-script-from-outside-the-editor/686226/3 "2025-06-03T18:33:32Z")

</div>

If people are still struggling with this, here’s how to achieve it  
Go where your Unreal Editor binary is, Usually under “C:\Program Files\Epic Games\UE\_5.5\Engine\Binaries\Win64”  
Open your PowerShell and execute the following  
\UnrealEditor-Cmd.exe" “C:\UnrealProjects\YourProject.uproject” -run=pythonscript -Script=“PathToScript\Script.py” -unattended -nullrhi
