On Fri, Aug 7, 2009 at 1:54 PM, Scott Stafford <scott.staff...@gmail.com>wrote:
> Interesting... Are you using SWIG to wrap the C++?
No, straight C extensions. (SWIG is just a code generator that generates C
> Would you have to
> actually compile something to use a message in Python (god forbid)?
You'd have to install a general protocol buffers extension, but you would
not have to compile any C++ code specific to your message types (unless you
want even more speed).
> Thinking about it a bit, I guess you'd just SWIG the static (non-
> generated) interfaces and the Python classes would all operate
> exclusively through reflection, such that any Python operation (or
> "class definition") would just call various DescriptorPool and
> Reflection methods to perform all operations... ? If so, that changes
> a lot of things for us, but possibly 90% for the better...
That sounds more or less accurate, though we're still not completely sure
how it will end up looking. The first priority is to make the Python API
faster (without necessarily adding any new functionality), but adding access
to DescriptorPool makes some sense once we have that.
> On Aug 7, 4:20 pm, Kenton Varda <ken...@google.com> wrote:
> > Well, note that soon (hopefully in the next major release after 2.2.0 --
> > actually have someone actively working on it now) the Python
> > will be able to wrap C++ classes for better performance. At that point
> > will probably be easy to accomplish what you want by handing off most of
> > work to the C++ library (and I can imagine that we'd provide a Python API
> > for this).
> > But if you need something that works without any C extensions, the more
> > will have to be done.
> > On Fri, Aug 7, 2009 at 1:03 PM, Scott Stafford <scott.staff...@gmail.com
> > > Hi -
> > > We need DescriptorPool::BuildFile-like functionality in the protobuf
> > > Python library. In other words, something that can take a
> > > FileDescriptorProto object and create a bunch of
> > > descriptor.Descriptor's that can be made into dynamic loaded
> > > classes.
> > > We haven't looked very closely at this problem yet, we're still trying
> > > to assess exact requirements.
> > > I am pretty sure nothing like it exists (correct?). If we built it
> > > ourselves, is it something that could be/would be of interest for the
> > > official protobuf distro? Does anyone have opinions on the form it
> > > should take?
> > > Scott- Hide quoted text -
> > - Show quoted text -
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to
For more options, visit this group at