On Wed, Feb 16, 2011 at 03:08:39PM +0000, Hyrum K Wright wrote:
> I'm writing a script in which I simply want to retrieve a set of
> arbitrary log message and then do stuff with them.  Using the Python
> bindings seemed like the logical choice (whether is was or not is now
> debatable, but that isn't the point of this mail).  Turns out that
> using the Python bindings is a *painful* experience, for at least the
> following reasons (and they may extend to the other swig-generated
> bindings, I don't know):
> 
>  * This is little to no documentation.  What docs that do exist relate
> to the C APIs, and have little bearing on Python types and their
> conversions.
>  * Because of the above, development with the bindings tends to be by
> trial-and-error.
>  * The bindings are verbose (client.svn_client_get_log5), and do
> little to help the user.
>  * They are still very C-like, not using common idioms from the target 
> language.
> 
> I don't know how to solve these problems today or tomorrow, and they
> may already be old news to many people here.  But to a new user of the
> bindings, it sure was a frustrating experience (and I already know the
> Subversion C infrastructure!)  I finally gave up and just used the
> commandline, piping the results into my processing script.  I feel
> sorry for folks trying to use the bindings from scratch.
> 
> -Hyrum (who feels better now)

This is because the bindings are generated with SWIG.
We cannot really fix this without using a different approach.

We could improve the documentation. An introductory document that
explains how to apply the C API docs to the python bindings would
be helpful. Maybe someone with some experience in using the python
bindings could write something like this?

Also, there's an API built on top of the bindings that is easier to use
and has better documentation: http://pysvn.tigris.org/

Reply via email to