~ubuntu-branches/ubuntu/utopic/gozerbot/utopic

« back to all changes in this revision

Viewing changes to debian/gozerbot/usr/lib/python2.5/site-packages/gozerbot/plughelp.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2009-09-14 09:00:29 UTC
  • mfrom: (1.1.4 upstream) (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090914090029-uval0ekt72kmklxw
Tags: 0.9.1.3-3
Changed dependency on python-setuptools to python-pkg-resources
(Closes: #546435) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# gozerbot/plughelp.py
2
 
#
3
 
#
4
 
 
5
 
""" help about plugins """
6
 
 
7
 
__copyright__ = 'this file is in the public domain'
8
 
 
9
 
class Plughelp(dict):
10
 
 
11
 
    """ dict holding plugins help string """ 
12
 
 
13
 
    def add(self, item, descr):
14
 
        """ add plugin help string """
15
 
        item = item.lower()
16
 
        self[item] = descr
17
 
 
18
 
    def get(self, item):
19
 
        """ get plugin help string """
20
 
        item = item.lower()
21
 
        try:
22
 
            return self[item]
23
 
        except KeyError:
24
 
            return None
25
 
 
26
 
plughelp = Plughelp()