Table of Contents
txny_schema.py: Python
declarations for the schematxny.py module: prologueclass TxnyTxny.genAbbrs(): Generate
all valid bird codesTxny.genTxKeys(): Generate all
phylogenetic key numbersTxny.lookupAbbr()Txny.lookupCollision()Txny.lookupSci()Txny.lookupTxKey()Txny.abbrToEng()Txny.abbrToTex()Txny.__init__()Txny.__readTaxonomy()txny.__buildMaps(): Index by key and
scientific nameTxny.__addTaxonMaps(): Add a taxon
to the internal dictionariesTxny.__readAbbrs()Txny.__readCollisions()Txny.__addCollision(): Add one
collisionclass Hierclass Rank: One taxonomic rankclass Taxonabbr.py moduleThis document describes the internals of the programs associated with A system for representing bird taxonomy.
Here, in literate style, is the source code for the Python
objects in the txny.py module.
In addition to its utility in bird records management, this module is also an example of several useful techniques:
Literate programming, the writing of code and documentation as a single process with a single source file. See A source extractor for lightweight literate programming.
Cleanroom (zero-defect) programming. See Toward Zero-defect Programming by Allan M. Stavely (Addison-Wesley, 1999, ISBN 0-201-38595-3) for an overview of this methodology, and see also the author's Cleanroom pages for details of the method as he practices it.
XML processing using the Document Object Model; see Python ande the XML Document Object Model (DOM).
This publication is available in Web form and also as a PDF document.
Source files mentioned in this document:
txny_schema.py: Python
constants relating to the schema.
txny.py: Python module to access taxonomy data in
XML form.
abbr.py: Six-letter bird code system module.
dom_helpers.py: Helper
functions for the DOM (XML Document Object Model).