[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Python bindings

From: Greg Stein <gstein_at_lyra.org>
Date: 2004-05-10 12:26:42 CEST

[ yah, this is a bit late, along with my prior post... so sue me ]

On Wed, Apr 28, 2004 at 05:54:43PM -0700, Ben Reser wrote:
> > A parser for the svn headers is definitively a different beast than a
> > C preprocessor.
> You can't possible parse header files without preprocessing them.
> Otherwise you'll not get the resulting true value of constants. Now I
> suppose you could run cpp on the files first and then parse the result...

Actually, I'm with Lele on this one. You can get practically 90% of the
SVN interface extracted with just a few regex. I demo'd this a long while
back with build/generator/extractor.py. It goofed on a few things, but
that was mostly due to non-standard formatting in the headers. After
fixing that up, there was one stray thought that svn_boolean_t was a
function, so extractor.py just punts on that.

Our header files are *very* regular. The simple reason is that we're a
single project. A full C preprocessor, or the complexity that is built
into SWIG, is there because it has to parse all kinds of headers. We have
the option to make our headers conform to our own parsing needs. That is
actually *very* handy, and can tremendously simplify the whole task.

> > Maybe, by the time I will be back on the matter, you will provide an
> > excellent and complete Pythonic world for svn, and we'll be happily
> > exchanging our experiences about which language better fits svn
> > problem domain. Till then, you are just promising.
> I didn't promise anything. I'll point out that we've had very few
> complaints about the Python bindings being incomplete. You seem to
> think they are not even up to simple tasks.

Heh. I've been using the Python bindings for years. Literally.

But that said: I doubt that Ben was bashing the Python bindings in that
way. Instead, I think each of you were just overreacting and should have
stopped to take a breath :-)


Greg Stein, http://www.lyra.org/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 10 12:28:42 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.