Python Forum
embedded Python scripts - is it worthwhile - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: embedded Python scripts - is it worthwhile (/thread-41587.html)



embedded Python scripts - is it worthwhile - Skaperen - Feb-12-2024

i have an application i am creating. it's still in the planning stage. it could be written in C but i do expect to prototype it in Python. it will allow users to create scripts particularly to customize some actions. i am thinking about how best to run these scripts. i could run them as commands by executing Python to do so. but it might be easier to use embedded Python. has anyone here ever used embedded Python particularly to add scripting to a non-Python application, that could summarize the scale of work involved? i do expect the need to run multiple scripts concurrently.


RE: embedded Python scripts - is it worthwhile - PyDan - Feb-20-2024

I think it can be worthwhile, especially if you have an API to wrap. I’ve embedded Python in AutoCAD, it’s pretty slick as it’s possible to load python functions as commands https://github.com/CEXT-Dan/PyRx

I used boost::python to do the heavy lifting. Might be a pain in C if you plan on wrapping something big


RE: embedded Python scripts - is it worthwhile - DeaD_EyE - Feb-20-2024

(Feb-12-2024, 08:58 PM)Skaperen Wrote: has anyone here ever used embedded Python particularly to add scripting to a non-Python application, that could summarize the scale of work involved? i do expect the need to run multiple scripts concurrently.

Oh my gosh... I did it with Visual Components and was enforced to use Python 2.7. I think they programmed it with C# and they used IronPython to embed Python. The funniest part was, that they relied on Python for some plugins. I don't know the current state of the application because I'm no longer a user of it.


RE: embedded Python scripts - is it worthwhile - Skaperen - Feb-21-2024

i have another project that i want to do embedded scripts in. this project make more sense to just do in Python (it's a text editor). maybe i should move ahead with this project to just try it out. the idea with this one is that it is script driven, not interactive.