Re: [Tutor] Question on how to do something.

2008-07-18 Thread Jerry Hill
On Thu, Jul 17, 2008 at 6:39 PM, Mitchell Nguyen <[EMAIL PROTECTED]> wrote: > Hello. I'm new to Python and I was wondering how to read all the files in a > folder. I used this program or command for single files. > > And if possible, is there a way to make it so that it waits at the end of > each f

Re: [Tutor] Question on how to do something.

2008-07-17 Thread Alan Gauld
"Mitchell Nguyen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello. I'm new to Python and I was wondering how to read all the files in a folder. Take a look at the fileinput module, I think it will do what you want. Alan G ___

[Tutor] Question on how to do something.

2008-07-17 Thread Mitchell Nguyen
Hello. I'm new to Python and I was wondering how to read all the files in a folder. I used this program or command for single files. importĀ pprint pprint.pprint(open(r'c:\text\somefile.txt').readlines()) And if possible, is there a way to make it so that it waits at the end of each file for a