Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Misleading error message when opening a file (on Windows XP SP 2)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Claudio Grondi, post: 1920676"] Using MSVC++ .NET 2003 compiler (if I did it all the right way): fstm = fopen("bigfile.dat","r+"); if(fstm == 0) { printf( " ErrNo: %i \n", errno ); } // ^-- prints : // on "r+" with too large file: 22 (EINVAL-Invalid argument) // on non-existing file : 2 (ENOENT-no such file) // on bad mode string spec. : 0 (??? why not EINVAL ...) So there _is_ a way to distinguish the different problems occurred while opening the file. The error message comes from Python (errnomodule.c), not from Windows(errno.h). Concluding from this it becomes evident for me, that this misleading error message is Python fault (even if originated by misleading errno values set after fopen in the MSVC++ environment and Windows), right? Probably also in Python 2.5? Claudio Grondi [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Misleading error message when opening a file (on Windows XP SP 2)
Top