figure - attempting to open nonexistent file never works obtaining list of exception arguments the list of arguments supplied with exceptions varies by exception and by what the sender pro vides it isn' always easy to figure out what you can hope to obtain in the way of additional informa tion one way to handle the problem is to simply print everything using code like this (this example also appears with the downloadable source code as getexceptionarguments py)import sys tryfile open('myfile txt'except ioerror as efor arg in argsprint(argelseprint("file opened as expected "file close()the args property always contains list of the exception arguments in string format you can use simple for loop to print each of the arguments the only problem with this approach is that you're missing the argument namesso you know the output information (which is obvious in this case)but you don' know what to call it more complex method of dealing with the issue is to print both the names and the contents of the arguments the following code displays both the names and the values of each of the arguments (this example also appears with the downloadable source as getexceptionarguments py)import sys tryfile open('myfile txt'(continued