# Run commands at PythonSlicer

**URL:** <https://discourse.slicer.org/t/run-commands-at-pythonslicer/41775>\
**Category:** Development\
**Tags:** python\
**Created:** [February 19, 2025, 6:32pm UTC](https://discourse.slicer.org/t/run-commands-at-pythonslicer/41775 "2025-02-19T18:32:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Djonathan\_Souza](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/djonathan_souza/32/79307_2.png) [@Djonathan\_Souza](https://discourse.slicer.org/u/Djonathan_Souza)\
**Post date:** [February 19, 2025, 6:32pm UTC](https://discourse.slicer.org/t/run-commands-at-pythonslicer/41775/1 "2025-02-19T18:32:44Z")

</div>

Hi,

Is there a way to run these commands in PythonSlicer?

I need to access `mrmlScene` from PythonSlicer, but I’m not sure how to do it. Any suggestions?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/4/949dd0723387c19ba309c606c8addacf9ab3ff2d.png)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 19, 2025, 7:13pm UTC](https://discourse.slicer.org/t/run-commands-at-pythonslicer/41775/2 "2025-02-19T19:13:54Z")

</div>

PythonSlicer exposes only the python part, not the slicer application part. You can use the `--no-main-window` to run a script with app features but no gui.
