Re: List of files to be opened

2006-01-26 Thread Fredrik Lundh
Carl J. Van Arsdall wrote: > > os.walk is your friend. Its has wonderful functionality. > > Don't you mean os.path.walk ? os.walk is a generator-based version of os.path.walk. instead of putting the logic in a callback function, you put it in a for loop: for root, dirs, files in os.walk(top

Re: List of files to be opened

2006-01-26 Thread Carl J. Van Arsdall
Ken Starks wrote: > yawgmoth7 wrote: > > >> Hello, I am currently writing a script that requires a few different >> files to be opened, and examined. What I need to be able to do is use >> something like: >> >> filelist = os.system("ls") >> > >> I cannot think of a way to do this, I could p

Re: List of files to be opened

2006-01-26 Thread Ken Starks
yawgmoth7 wrote: > Hello, I am currently writing a script that requires a few different > files to be opened, and examined. What I need to be able to do is use > something like: > > filelist = os.system("ls") > > > > I cannot think of a way to do this, I could put them in a list of > something o

Re: List of files to be opened

2006-01-25 Thread James Stroud
yawgmoth7 wrote: > Hello, I am currently writing a script that requires a few different > files to be opened, and examined. What I need to be able to do is use > something like: > > filelist = os.system("ls") > > > I cannot think of a way to do this, I could put them in a list of > something of

Re: List of files to be opened

2006-01-25 Thread Carl J. Van Arsdall
yawgmoth7 wrote: > Hello, I am currently writing a script that requires a few different > files to be opened, and examined. What I need to be able to do is use > something like: > > filelist = os.system("ls") > There are a number of ways you can do this, one method would be to do a loop for f

List of files to be opened

2006-01-25 Thread yawgmoth7
Hello, I am currently writing a script that requires a few different files to be opened, and examined. What I need to be able to do is use something like: filelist = os.system("ls") I cannot think of a way to do this, I could put them in a list of something of the sort. But that still does not s