[sword-devel] Python bindings and dynamic cast

Luke Plant L.Plant.98 at cantab.net
Wed Mar 19 16:39:55 MST 2008


Hi,

I've been trying to use Sword with Python bindings to simply get a 
list of verses with a reference like "Genesis 1:1-10".  All the 
example code I can find, including code I have written in the past, 
uses a dynamic cast:

1) VerseKey::ParseVerseList() is used, which returns a ListKey*
2) A dynamic cast is done to return a VerseKey*
3) Then VerseKey::UpperBound() and VerseKey::LowerBound() are used in 
iterating over the verses.

The problem is, I can't work out how to do step 2) or equivalent in 
Python.  I'm using the standard Python bindings, built from 
sword-1.5.9/bindings/swig/
Help would be much appreciated.

Thanks,

Luke

-- 
"Ineptitude: If you can't learn to do something well, learn to enjoy 
doing it poorly." (despair.com)

Luke Plant || http://lukeplant.me.uk/



More information about the sword-devel mailing list