extracting keywords from %(keyword)s-based templates

Ignacio Vazquez-Abrams ignacio at openservices.net
Sat Sep 1 01:21:55 CEST 2001


On Fri, 31 Aug 2001, Jeff Shannon wrote:

> def test():
>     trap = KeywordTrap()
>     "Testing ... %d %s %f %(one) %(two) %(test)" % trap

  "Testing ... %d %s %f %(one)s %(two)s %(test)s" % (trap, trap, trap, trap,
trap, trap)

>     print trap.allwords.keys()B
>
> if __name__ == '__main__':
>     test()

 ...

>     "Testing ...  %(one) %(two) %(test)" % trap

  "Testing ...  %(one)s %(two)s %(test)s" % (trap, trap, trap)

See if those changes help.

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list