[C++-sig] Pyplusplus templates and roadmap

Allen Bierbaum abierbaum at gmail.com
Sun Jan 15 17:28:07 CET 2006


On 1/15/06, Roman Yakovenko <roman.yakovenko at gmail.com> wrote:
> On 1/15/06, Allen Bierbaum <abierbaum at gmail.com> wrote:
> > I am looking at using pyplusplus to replace my current usage of Pyste
> > on one of my projects.  In reading through the comparison between the
> > two (http://www.language-binding.net/pyplusplus/to_pyste_comparison.html)
> > it looks like pyplusplus does not support templates.
>
> It does not supports templates as Pyste. This is true. But pyplusplus
> provides you with
> an other way. Can you take a look at boost.date_time library? This
> library is "one big template". I exposed whole library to show the
> power of pyplusplus. I am almost sure you
> can do the same with your library too. You can find relevant files
> within "examples" directory.

I took a look at this library, but unfortunately I can't really make
heads or tails of it because I can't find any documentation about the
basics.  I just don't understand enough about the model used by
pyplusplus to be able to understand the python code used to generate
the wrappings.

The one thing I think I really need (and I think is needed in general
before many others will port over from Pyste) is a coupld of simple
tutorial examples.  I applaud you for including detailed examples of
using pyplusplus to wrap existing libraries, but this doesn't really
explain how to use it.

What I would like to see is a simple tutorial similar to the pyste
documentation in Boost.Python.  Just step by step instructions for how
to wrap a simple class or two and an explaination of why each step
matters and how it works.  This would do more for me then providing
wrappers for any number of libraries.

I should say that after seeing the lack of documentation I did take a
stab at the classic "look at the source" method of figuring things out
but there are so few coments in the code that this didn't work out
well.  I would highly suggest that in addition to a tutorial you
provide a short design document as an introduction for developers and
then document the actual code.  My hope is that this will allow others
to extend, maintain, and build upon the current code base.

>
> >Unfortunately my
> > current project makes extensive use of templates so I may need to hold
> > off on converting it.
> > Taking that in account, is there a development roadmap for future
> > features of pyplusplus?  Will  it support templates at any point in
> > the near future.
>
> Please, take a look on boost.date_time example. If you still need some
> functionality,
>  changes in interface or suggestions - I am here.
>
> > Thanks,
> > Allen
>
> If you decide not to switch from Pyste I would like to hear the reasons.

I have hit the limits of Pyste.  I have to create quite of bit of
custom code and manual edits for most projects I wrap and that just
doesn't scal well.  I have 4-5 projects I would like to move over to
use pyplusplus as soon as possible.  The largest of these projects
makes use of about 11,000 lines of Boost.Python wrapper code generated
from a combination of Pyste and custom scripts.

The only thing that is keeping me from trying to port right now is the
lack of a tutorial that explains how to wrap a library.

Please keep up the good work.  I think your solution looks like it is
very powerful, I just wish I could figure it out. :)

-Allen

>
> Good luck.
>
> Roman Yakovenko
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>



More information about the Cplusplus-sig mailing list