[Tutor] Multiple file open

Steven D'Aprano steve at pearwood.info
Fri Aug 20 09:57:31 CEST 2010


On Fri, 20 Aug 2010 05:28:42 pm nitin chandra wrote:

> try:
>    fp6 = open(FileA,'r')
>    except IOError:

You need to outdent the except line:

try:
    fp6 = open(FileA,'r')
except IOError:
    sys.exit('Could not open file: %s' %  FileA)



-- 
Steven D'Aprano


More information about the Tutor mailing list