Python about file I/O

Ken ken at
Fri Sep 20 23:07:28 EDT 2002

Hi, I have 2 questions on IO, not necessary related to one another:

1.) How do you list the filenames within a given directory so user can
choose which file to open?

2.) How do you ensure the program doesn't crash if I specify a filename to
open but the file doesn't exist? (I.E. how to check if file exist before
opening the file?)


More information about the Python-list mailing list