Changeset 817
- Timestamp:
- 02/27/03 10:09:20 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r804 r817 15 15 # 16 16 # $Log$ 17 # Revision 1.22 2003/02/27 09:09:20 jalet 18 # Added a method to match strings against wildcard patterns 19 # 17 20 # Revision 1.21 2003/02/17 23:01:56 jalet 18 21 # Typos … … 93 96 import sys 94 97 import os 98 import fnmatch 95 99 import getopt 96 100 import smtplib … … 211 215 return 0 212 216 return 1 217 return 0 218 219 def matchString(self, s, patterns) : 220 """Returns 1 if the string s matches one of the patterns, else 0.""" 221 for pattern in patterns : 222 if fnmatch.fnmatchcase(s, pattern) : 223 return 1 213 224 return 0 214 225