[Q] ctypes callbacks with Delphi

Jimmy Retzlaff jimmy at retzlaff.com
Mon Oct 20 01:46:54 EDT 2003


achrist at easystreet.com wrote:
> Jimmy Retzlaff wrote:
> >
> > Another approach might be to spawn two
> > executables, one for your wxPython windows, and another for your
Delphi
> > forms, and use an IPC mechanism to communicate between them.
> >
> 
> I suppose I'm now thinking that this would be the best way to go.
> It looks to me like using pexpect would be much simpler than
> communication through sockets or even ctypes.
> 
> Any likely problems trying to get pexpect to let a GUI wxPython app
> control a GUI Delphi app (with console) under all versions of Windows
> (say Win NT, Win98 and later)?

The last I heard, pexpect didn't work on Windows, but I'm certainly no
expert on it. If that still holds then things like XMLRPC and SOAP might
be options depending on how well they are supported on the Delphi side.
XMLRPC is almost trivial in Python (see xmlrpclib). You can also use the
SimpleHTTPServer module in Python and use an http client in Delphi to
send strings back and forth pretty easily. All these options would also
let the processes run on separate machines if that would be of any
benefit in your particular application.

Jimmy





More information about the Python-list mailing list