}
}
});
}
else if (ret instanceof PyObjectDerived) {
final PyObjectDerived iter = (PyObjectDerived)ret;
response.setEntity(new OutputRepresentation(mediaType) {
@Override
public void write(OutputStream outputStream) throws IOException {
PyObject next = null;
while ((next = iter.__iternext__()) != null) {
outputStream.write(next.toString().getBytes());
outputStream.write('\n');
}
}
});