I am sorry, but I don't understand this comment. Afaik, an IOError can be thrown by execfile.

What do you mean by making the try lines smaller? Do you mean shorter... but that doesn't explain the dependence on the first part of the statement...

Sorry. Please expand on that. Thanks.