Next: Python Example, Previous: Python Dictionary Class, Up: Python
[Contents][Index]
Registers new match strategy. The arguments are:
Strategy name for use in the MATCH
command.
The dscription, which will appear in the output of SHOW STRAT
command.
Optional selector procedure.
If the proc argument is present, it must be the name of a Python function declared as:
def select(opcode key headword):
Its arguments are:
Integer operation code.
An DicoSelectionKey
object identifying the search term
(see The DicoSelectionKey
class).
The headword being examined.
At the beginning of the search, the function is called with the ‘DICO_SELECT_BEGIN’ as its opcode argument. It must perform the necessary initialization and return.
At the end of the search loop, the function is called with opcode ‘DICO_SELECT_END’. It must perform the necessary deinitialization procedures and exit.
In both cases, the key and headword arguments are not defined.
Within the search loop, the function will be called for each headword from the database. The opcode parameter will be ‘DICO_SELECT_RUN’. In this case the function must return ‘True’ if the headword matches the key and ‘False’ otherwise.
Registers a markup name.
Returns the name of the current markup.
Next: Python Example, Previous: Python Dictionary Class, Up: Python
[Contents][Index]