<div>Hi.</div>
<div> </div>
<div>Glad you got it to build.</div>
<div> </div>
<div>Examples:</div>
<div>For example, to output the text of a verse from the ESV</div>
<div> </div>
<div>>>> import Sword<br>>>> markup=Sword.MarkupFilterMgr(Sword.FMT_HTMLHREF) #Html markup</div>
<div>>>> markup.thisown=False #Tell SWIG not to bother cleaning this up<br>>>> mgr=Sword.SWMgr(markup) #new mgr<br>>>> mod=mgr.getModule("ESV") #get esv<br>>>> vk=Sword.VerseKey
("Matthew 1:1") <br>>>> mod.setKey(vk) #set key for mod<br>'\x00'<br>>>> mod.RenderText() #render the text<br>'<a href="passagestudy.jsp?action=showNote&type=x&value=1&module=ESV&passage=Mat
<br>thew+1%3A1"><small><sup>*x</sup></small></a> The book of the genealogy of Jesus<br>Christ, <a href="passagestudy.jsp?action=showNote&type=x&value=2&module=ESV&pass
<br>age=Matthew+1%3A1"><small><sup>*x</sup></small></a> the son of David, <a href="p<br>assagestudy.jsp?action=showNote&type=x&value=3&module=ESV&passage=Matthew+1%3A1"
<br>><small><sup>*x</sup></small></a> the son of Abraham.'<br> </div>
<div>To output, for all modules installed, their names and types:</div>
<div>>>> import Sword<br>>>> mgr=Sword.SWMgr()<br>>>> for mod in mgr.getModules().values(): #mgr.getModules is a map, keys are type SWBuf, values are SWModules<br>... print mod.Name() + " is a '" +
mod.Type()+"'" #name of mod and type</div>
<div>ESV is a 'Biblical Texts'</div>
<div>MHC is a 'Commentaries'</div>
<div>etc.</div>
<div> </div>
<div>For longer examples, look at my Gospel Harmony Viewer. The files BibleInterface.py, Book.py and Dictionary.py are from a larger project I am doing, and have much more than the gospel harmony viewer needs. This code isn't well commented, I'm afraid, nor pythonic.
</div>
<div> </div>
<div>If you have any specific questions on how to do something, just email me.</div>
<div> </div>
<div>God Bless,</div>
<div>Ben</div>
<div><span class="gmail_quote">On 1/28/07, <b class="gmail_sendername">Pierre Amadio</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:pierre.amadio@libertysurf.fr" target="_blank">pierre.amadio@libertysurf.fr
</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi there.<br><br>After chatting a bit on #maemo, i installed a version of python2.5<br>(instead of 2.3) on the scratchbox environment.
<br><br>I was happy to realise the sword python module was working with this<br>version of python: the import _Sword did not complain.<br><br>However, in this specific version of python, the help keyword is not<br>implemented, so i cannot ask for help(_Sword)
<br><br><br>On Thu, Jan 25, 2007 at 01:43:20PM +1100, Ben Morgan wrote:<br>> This should build the extension. I'm not sure whether you need to install it<br>> (if you do, just type cd python && python setup.py
install<br>><br>> If you would like any examples of how to use SWORD under python, just email<br>> me<br><br>Those example would be greatly appreciated :)<br><br>Have a nice day.<br><br>_______________________________________________
<br>sword-devel mailing list: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">
http://www.crosswire.org/mailman/listinfo/sword-devel </a><br>Instructions to unsubscribe/change your settings at above page<br></blockquote></div><br><br clear="all"><br>-- <br>God Bless,<br>Ben<br>-------------------------------------------------------------------------------------------
<br>"Glory is fleeting, but obscurity is forever" Napoleon Bonaparte