# Can we start PIE from Python script?

**URL:** <https://forums.unrealengine.com/t/can-we-start-pie-from-python-script/657650>\
**Category:** Editor Scripting\
**Tags:** Python, Editor-Scripting, unreal-engine, UE5-0, question\
**Created:** [September 27, 2022, 5:23pm UTC](https://forums.unrealengine.com/t/can-we-start-pie-from-python-script/657650 "2022-09-27T17:23:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrp\_vh1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vrp\_vh1](https://forums.unrealengine.com/u/vrp_vh1)\
**Post date:** [September 27, 2022, 5:23pm UTC](https://forums.unrealengine.com/t/can-we-start-pie-from-python-script/657650/1 "2022-09-27T17:23:07Z")

</div>

Hi,

so I was wondering if it’s possible to start “PIE” wait for the “END” and then close the editor from a python script.

the job that I would like to automate is basically:

- open project in editor
- hit “play”
- wait for “game quit”
- close the editor

it sounds like it should be really easy, but I failed to find a solution. I tried to search online and in the docs, but there is nothing. Your help would be appreciated.
