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 file for a confirmation to go onto the next file? Thanks
Try something like this:
import glob
for filename in glob.glob('*.txt'):
print filename
response = raw_input("Press ENTER to continue.")
Instead of the print statement, you can process your file any way you
like. If you want to give the user the ability to abort the program,
or take some other action, you can look at the response variable and
decide what to do with the user's input.
--
Jerry
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor