communication with a java applet

Giles Brown giles_brown at hotmail.com
Mon Mar 25 15:18:44 EST 2002


Looping <looping002 at hotmail.com> wrote in message news:<3C9F100D.BAB4F24D at hotmail.com>...
> Hi all,
> 
> I am trying to make a real-time system communicate with a java applet
> under IE 5.5. I only have a pyd file (Python 1.5.2) to get the floats
> calculated on the platform and I wonder how to make the platform
> communicate with my java applet : TCP/IP, CORBA, shared memory,
> others... ?
> 
> Thanks in advance for any advices,

Its relatively straightforward to get Python and Java to talk over
sockets.
If you want to send data in a binary format then on the Python side of
things there is the "xdrlib" (I'm assuming this was present in Python
1.5.2 as I don't have 1.5.2 installed anymore).  On the Java side
you'd want to get hold of a DataInputStream (or DataOutputStream). 
Something like:

DataInputStream dis = new DataInputStream(mySocket.getInputStream()) ;
double nextValue = dis.readDouble() ;

Good luck,
Giles



More information about the Python-list mailing list