Changeset 2650
- Timestamp:
- 02/08/06 13:21:50 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r2643 r2650 206 206 207 207 def matchString(self, s, patterns) : 208 """Returns 1 if the string s matches one of the patterns, else 0.""" 209 for pattern in patterns : 210 if fnmatch.fnmatchcase(s, pattern) : 211 return 1 212 return 0 208 """Returns True if the string s matches one of the patterns, else False.""" 209 if not patterns : 210 return True # No pattern, always matches. 211 else : 212 for pattern in patterns : 213 if fnmatch.fnmatchcase(s, pattern) : 214 return True 215 return False 213 216 214 217 def display_version_and_quit(self) :