[Twisted-Python] Question on new code development

Itamar Shtull-Trauring itamar at itamarst.org
Fri Jan 21 16:31:39 EST 2005


On Fri, 2005-01-21 at 14:54 -0600, Bill Krueger wrote:

> The data is composed of interactive text streams, Java types/classes
> (representing mouse movements, etc) and binary data (jpg/png type data).
> I can convert the  data to a "neutral" format (such as xdr) and build
> communication data structures to encapsulate it if needed but if the
> TwistedJava code does this already I'm that much further ahead. Keeping
> the data streams in a Java native format "seems" like a good way to go
> but the Python code will need to use the data as well and I'm not that
> far along with what the difference between a Java String and Python
> String (repeat this for each Java native type) are.

TwistedJava will do the expected conversion by default (so e.g. String
to unicode string in python, ArrayList to list, Integer from/to python
int, etc..). It's lossy going from Python to Java though (can't make
Java ints, only Integers with the default objects,), so you'll need to
write some custom code to create java arrays, but not too much.






More information about the Twisted-Python mailing list