[issue3099] On windows, "import nul" always succeed

Amaury Forgeot d'Arc report at bugs.python.org
Fri Jun 13 18:43:17 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

OK, I think I got is now. The difference is between debug and release
builds.

Explanation:
- in release build, "import nul" calls stat("nul.pyd") which succeeds.
It then tries LoadLibrary("nul.pyd"), which fails with a DLL error.
- in debug builds, "import nul" first tries stat("nul_d.pyd") which
fails. It then tries stat("nul.py"), which succeeds to return an empty file!

Whaaaa.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3099>
_______________________________________


More information about the Python-bugs-list mailing list