On May 17, 3:49 am, mosscliffe <[EMAIL PROTECTED]> wrote:
> I have been playing with GLOB and OS.PATH and it all works, but is
> there a better way of getting GLOB to recognise, multiple patterns at
> one call (ONE).
>
A better way? You haven't posted a way to do that. And a quick
perusal of the
One: Not that I know of
Two: You could use list comprehension...
--- CODE --
import os
import glob
patterns = ('.\\t*.py', '.\\*.c??', '.\\*.txt')
filenames = [glob.glob(pat) for pat in patterns]
# Or as a one liner...
filenames = [glob.glob(pat) for pat
In <[EMAIL PROTECTED]>, mosscliffe
wrote:
> --- CODE --
> import os
> import glob
>
> filenames = []
> patterns = ('.\\t*.py', '.\\*.c??', '.\\*.txt') # Can these patterns
> for glob processing be specified in the glob call *ONE
> for pattern in pa