You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Phillip B Oldham <ph...@gmail.com> on 2009/01/09 01:02:18 UTC

Example of using thrift with Jython?

I'm trying to create a thrift server in jython, but I'm having a hard
time working out how to get started. I'm assuming that I use the java
thrift modules, but doing the import as follows:

import com.facebook.thrift.TBase;
import com.facebook.thrift.TException;
import com.facebook.thrift.TSerializer;
import com.facebook.thrift.TDeserializer;
import com.facebook.thrift.protocol.TBinaryProtocol;
import com.facebook.thrift.protocol.TProtocol;
import com.facebook.thrift.protocol.TProtocolFactory;
import com.facebook.thrift.protocol.TSimpleJSONProtocol;
import com.facebook.thrift.transport.TIOStreamTransport;
import com.facebook.thrift.transport.TTransport;

returns this error:
ImportError: no module named facebook

I'm not sure whether this is because thrift hasn't been built
correctly with java support, whether I'm including things incorrectly,
or what. An example to follow or a nudge in the right direction would
be very helpful!

-- 
Phillip B Oldham
phillip.oldham@gmail.com
+44 (0) 7525 01 09 01