pattern-based string expansion

sue smalleys at gte.net
Wed Apr 12 23:09:19 EDT 2000


I need to generate a (largish) set of strings from a
pattern, sort of like glob with csh-style expansion.

Given "foo{,bar,baz/[aced]{,x,z}}", generate:

foo
foobar
foobaz/a
foobaz/c
foobaz/e
foobaz/d
foobaz/ax
foobaz/az

etc.

The manual doesn't seem to have this glob(3) option.

Sue.



More information about the Python-list mailing list