Shell style globbing instead or re syntax?
donn at u.washington.edu
Tue Aug 13 12:30:33 EDT 2002
Quoth bruce edge <bruce_edge at yahoo.com>:
| I'd doing a command line interface thingy in python.
| I want to support expressions for args, while I like python's re syntax,
| it's not what users expect.
| They're more used to bash style globbing. Is there a lib somewhere that I
| can use for this?
| glob doesn't work because it only works on filenames.
from fnmatch import fnmatchcase
matches = fnmatchcase(name, pattern)
NB, I guess it's bash style globbing, but of course it pre-dates
bash by many years.
Donn Cave, donn at u.washington.edu
More information about the Python-list