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

Re: Learning the Python API - early questions

From: Barry Scott <barry_at_barrys-emacs.org>
Date: 2003-10-18 21:15:44 CEST

At 16-10-2003 23:29, Russell Yanofsky wrote:
>The swig wrapper looks straighforward, although it's not clear why you need
>so many helper functions. Couldn't a user write
> all_dirents.size()
>instead of:
> svncpp.lenDirentList( all_dirents )
>- Russ

SWIG does not generate code at all for the methods on the templates.
You get this:

Traceback (most recent call last):
   File "test_ls.py", line 29, in ?
     main( sys.argv )
   File "test_ls.py", line 17, in main
     print all_dirents.size()
AttributeError: 'str' object has no attribute 'size'

I solved that with all the little functions. Not sure why its seen as a string.

I'm going to try using my PyCXX lib to remove the need for the small functions
and allow iterators to work. PyCXX is on http://sourceforge.net/projects/cxx/
and will allow a pythonic API to be created.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 18 21:16:26 2003

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.