# Using python code in clarion

**URL:** <https://clarionhub.com/t/using-python-code-in-clarion/6246>\
**Category:** questions\
**Tags:** interop\
**Created:** [May 17, 2023, 1:39pm UTC](https://clarionhub.com/t/using-python-code-in-clarion/6246 "2023-05-17T13:39:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sk2107](https://clarionhub.com/user_avatar/clarionhub.com/sk2107/32/3135_2.png) [@sk2107](https://clarionhub.com/u/sk2107)\
**Post date:** [May 17, 2023, 1:39pm UTC](https://clarionhub.com/t/using-python-code-in-clarion/6246/1 "2023-05-17T13:39:53Z")

</div>

Hi,

I wonder is there is a way to use python code inside the clarion application (of course other than RUN command)

Thank you  
note: I am using clarion 6.3

---

<div class="post-metadata">

**Author:** ![JonW](https://clarionhub.com/user_avatar/clarionhub.com/jonw/32/1344_2.png) [@JonW](https://clarionhub.com/u/JonW)\
**Post date:** [May 17, 2023, 6:26pm UTC](https://clarionhub.com/t/using-python-code-in-clarion/6246/2 "2023-05-17T18:26:18Z")

</div>

Possibly. For example if you google “Create DLL from python package” you will find an answer like this:  
\*_The standard Python “freeze” tool will create a C-language file which consists of the Python ._ **pyc files, and this file can be compiled to a DLL** which can be shipped with your application.

If you get that to work, then you just have to worry about prototyping whatever you want to call from Clarion. But you will also find that compiling to a DLL in Python, which is at its heart an interpreted language, is not that straightforward. Probably works in the case of simple code that doesn’t call other python libraries, but if you do, then making a DLL may not work out for you.

---

<div class="post-metadata">

**Author:** ![sk2107](https://clarionhub.com/user_avatar/clarionhub.com/sk2107/32/3135_2.png) [@sk2107](https://clarionhub.com/u/sk2107)\
**Post date:** [May 17, 2023, 7:12pm UTC](https://clarionhub.com/t/using-python-code-in-clarion/6246/3 "2023-05-17T19:12:18Z")

</div>

Thank you for your reply.

Regards
