--- ./Python/import.c.orig 2013-01-16 13:37:49.000000000 +0100 +++ ./Python/import.c 2013-01-16 14:03:04.000000000 +0100 @@ -7,6 +7,7 @@ #undef Yield /* undefine macro conflicting with winbase.h */ #include "pyarena.h" #include "pythonrun.h" +#include "errno.h" #include "errcode.h" #include "marshal.h" #include "code.h" @@ -1478,7 +1479,13 @@ if (filemode[0] == 'U') filemode = "r" PY_STDIOTEXTMODE; fp = fopen(buf, filemode); + if (fp == NULL & Py_VerboseFlag > 1) { + PySys_WriteStderr("Error opening file: %s\n", strerror( errno )); + } if (fp != NULL) { + if (Py_VerboseFlag > 1) { + PySys_WriteStderr("# OPENED\n"); + } if (case_ok(buf, len, namelen, name)) break; else { /* continue search */