How to Run a Python Script with .ini file?

i am running OH 3.4.2 on Windows 10.
i have a python script and i want to run it with openhab but i dont know how.
the script is 2 files one is the .py file and the other is the .ini file.
The jython addon is already installed.
I made a rule and then i choose…

then i paste the script

The problem is that the script need the .ini file.

Can someone help me please.


That’s not how it works.

If you want to write rules in Python you would use the Jython add-on, and there are certain things you need to do and ways you need to write the code to create rules using the Jython add-on (i.e. you can’t just write arbitrary Python code and run them with Jython on OH).

You need to install Python on your computer and use either the Exec binding or executeCommandLine Action to execute your script.

Thanks for your answer.
My first attempt was this. Installed python on my windows and run the script. Then i found the jython and i thought i can run the script inside on the openhab.

Thanks again.