January 2002
Beginner
480 pages
13h 15m
English
Taking keyassist step by step, the first section is probably familiar if you’ve seen the previous Python-based scripts in Section 8.1 and Section 8.3, both in Chapter 8.
import jabber from string import split, join, find import sys
Here, all of the functions and libraries that we’ll need are brought in. We’ll
use the find function from the
string library to help with the keyword searching.
Next, we declare the dictionary. This will hold a list of the words that the script will look for, as defined by each person, as shown in Example 9-3.
keywords = {}Read now
Unlock full access