On Tue, Aug 27, 2013 at 7:39 AM, bob gailer <bgai...@gmail.com> wrote:
> I plan to run a Python program from an ooRexx exec.
>
> I want the Python program to read/write variables in the ooRexx variable
> pool.
>
> How do I do that? Keep in mind that Python is interpreted rather than
> compiled.
>
I can't think of any easy way to do that. Maybe Rick knows of something
clever.
It seems to me it is basically an inter-process communication (IPC)
problem. You have the ooRexx interpreter running in one process and the
Python interpreter running in a second process.
You could use sockets to communicate between the two process. Devise your
own protocol to pass the name - value pairs for variables back and forth.
You should be able to use the socket support in both ooRexx and Python to
do that.
You could also use shared memory. I think you would need to write a native
extension in ooRexx and maybe in Python to set up and use the shared
memory. I know the native extension in ooRexx is doable and I'm sure it is
doable in Python.
Or use any other means of IPC available on the OS you ae running under.
Typically, when you start another executable in ooRexx the interpreter will
be waiting for that executable to end. You would need to have a second
thread in ooRexx to service the IPC.
--
Mark Miesfeld
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users