# Using the API with Python in my own control loop main.py

**URL:** <https://forum.opentap.io/t/using-the-api-with-python-in-my-own-control-loop-main-py/928>\
**Category:** Ecosystem\
**Tags:** python, opentap-sdk\
**Created:** [November 11, 2022, 8:13pm UTC](https://forum.opentap.io/t/using-the-api-with-python-in-my-own-control-loop-main-py/928 "2022-11-11T20:13:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alapierre](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alapierre](https://forum.opentap.io/u/alapierre)\
**Post date:** [November 11, 2022, 8:13pm UTC](https://forum.opentap.io/t/using-the-api-with-python-in-my-own-control-loop-main-py/928/1 "2022-11-11T20:13:14Z")

</div>

Hello,

When using the Python SDK, is it possible to run a test sequence without generating a plugin package and then having to run it with de CLI? I have a SCPI instrument that sends an arbitrary waveform in a serial port device.

I’d like to create my own main.py loop and eventually use PyQT6 for GUI creation because this is what I used before and know best, but I’d like to use the class structure of OpenTAP.

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [November 12, 2022, 8:52am UTC](https://forum.opentap.io/t/using-the-api-with-python-in-my-own-control-loop-main-py/928/2 "2022-11-12T08:52:22Z")

</div>

Hi @alapierre, and welcome to the forum!

Unfortunately we don’t support hosting the application inside a python for now.

I think you should be able to bootstrap it using a fairly minimal amount of C# code, if you just want to start the application and execute some python script which then runs the main loop.

---

<div class="post-metadata">

**Author:** ![alapierre](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alapierre](https://forum.opentap.io/u/alapierre)\
**Post date:** [November 15, 2022, 4:54pm UTC](https://forum.opentap.io/t/using-the-api-with-python-in-my-own-control-loop-main-py/928/3 "2022-11-15T16:54:10Z")

</div>

Thank you for your answer! I think i’ll also try to load the dll with the pythonnet library and using the classes that I need. Maybe it’ll work with minimal tweaking.
