Re: Newbie: Joining Lists

2007-05-17 Thread 7stud
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

Re: Newbie: Joining Lists

2007-05-17 Thread Matimus
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

Re: Newbie: Joining Lists

2007-05-17 Thread Marc 'BlackJack' Rintsch
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