Crazy question: is it possible/reasonable to use Python in LC?

Tom Glod tom at makeshyft.com
Sun Jul 23 02:21:37 EDT 2023


One way to do it would be running python "service" executable, and you send
it the code via socket to execute.
In python the "do" equivalent is "exec()" ... although obviously the
service will need access to the data that is involved with the code.
Then you return the result to lc in whatever way works best.
In theory.



On Mon, Jul 17, 2023 at 12:57 PM Ben Rubinstein via use-livecode <
use-livecode at lists.runrev.com> wrote:

> "do ... as python" ??
>
> On 13/07/2023 21:03, Geoff Canyon via use-livecode wrote:
> > I've been playing with Python, and it has a lot of nice qualities, but a
> > built-in GUI isn't one of them (no apologies to tkinter).
> >
> > So it would be interesting/nice to be able to open LC, add a button to a
> > stack, and put some python into the script of that button and have it
> just
> > work, with access to the rest of the LC stack/controls as usual.
> >
> > Obviously that's not possible, but how close can we come? I assume it
> would
> > be possible to write a shell command to trigger a python script, but that
> > seems complex and sub-optimal, especially when thinking about having to
> > bundle together all the bits and bobs from the LC UI to pass as arguments
> > to the Python script instead of having it able to just reference what it
> > needs on the fly.
> >
> > Anyway, wondering if anyone else has thought about this.
> >
> > gc
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list