Package pywikipedia :: Module wiktionary :: Class Term
[show private | hide private]
[frames | no frames]

Class Term

Known Subclasses:
Adjective, Noun

This is a superclass for terms.
Method Summary
  __init__(self, lang, term, relatedwords)
Constructor...
  __getitem__(self)
Documenting as an afterthought is a bad idea I don't know anymore why I added this, but I'm pretty sure it was in response to an error message
  getLang(self)
  getTerm(self)
  setLang(self, lang)
  setTerm(self, term)
  showcontents(self, indentation)
Prints the contents of this Term.
  wikiwrapasexample(self, wikilang)
Returns a string with the gender in a format ready for Wiktionary, if it is applicable
  wikiwrapastranslation(self, wikilang)
Returns a string with this term as a link followed by the gender in a format ready for Wiktionary
  wikiwrapforlist(self, wikilang)
Returns a string with this term as a link followed by the gender in a format ready for Wiktionary
  wikiwrapgender(self, wikilang)
Returns a string with the gender in a format ready for Wiktionary, if it is applicable

Method Details

__init__(self, lang, term, relatedwords=[])
(Constructor)

Constructor
Generally called with two parameters:
- The language of the term
- The term (string)

- relatedwords (list of Term objects) is optional

__getitem__(self)
(Indexing operator)

Documenting as an afterthought is a bad idea I don't know anymore why I added this, but I'm pretty sure it was in response to an error message

showcontents(self, indentation)

Prints the contents of this Term. Every subobject is indented a little further on the screen. The primary purpose is to help keep your sanity while debugging.

wikiwrapasexample(self, wikilang)

Returns a string with the gender in a format ready for Wiktionary, if it is applicable

wikiwrapastranslation(self, wikilang)

Returns a string with this term as a link followed by the gender in a format ready for Wiktionary

wikiwrapforlist(self, wikilang)

Returns a string with this term as a link followed by the gender in a format ready for Wiktionary

wikiwrapgender(self, wikilang)

Returns a string with the gender in a format ready for Wiktionary, if it is applicable

Generated by Epydoc 2.1 on Sun Jul 03 17:07:34 2005 http://epydoc.sf.net