How to import protocol buffer definitions from another Python package?

You don't add . Py to the import statement: "from sift import sift_descriptors_pb2.

Oops, that was a transcription error. I fixed my question. – Sancho Oct 26 '10 at 19:59 Thanks!

But, just to be clear, my question still stands. I had just asked it incorrectly at first. – Sancho Oct 26 '10 at 20:06.

I fixed it! The solution was to use import "sift/sift_descriptors. Proto" in filtered_descriptors.

Proto, and then point protoc to --proto_path=../ instead of --proto_path=../sift. Then, protoc generates python code that does the import as import sift. Sift_descriptors_pb2.

Talking with the maintainers of protocol buffers, --proto_path is supposed to point to the root of the package hierarchy and all imports should be fully qualified. Not well described in the documentation, but they'll fix it up :) – Sancho Oct 27 '10 at 7:10.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions