http://thrift.apache.org/にある thirft.apache.org サンプル クライアントのような PHP ベースのthrift API クライアントを Python で書きたいと思います。
私はこのコードを書きます:
//A struture
$up = UserProfile($uid=1,
$name="Mark Slee",
$blurb="I'll find something to put here.");
# Talk to a server via TCP sockets, using a binary protocol
$fp = fsockopen("localhost",9090, $errno, $errstr, 90);
# Use the service we already defined
$service=fwrite($fp, $up);
while (!feof($fp)) {
echo fgets($fp, 128);
}
http://thrift.apache.org/にある python クライアント コードの正しい代替方法は次のとおりです。
私はそれに慣れていないので、何か提案をしてください。
ありがとう