Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, ocean-city
Date 2008-06-13.01:18:46
SpamBayes Score 0.037023
Marked as misclassified No
Message-id <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za>
In-reply-to
Content
on Windows, the stat() function always returns True for some special
device names (nul, con, com1, lpt1...), even when followed by an extension.

Thus "import con" manages to find that "con.py" exists, and tries to
read from it... fun.

A solution is to use GetFileAttributes() instead.

Note that on python2.5.2, the error message suggest that we have such a
problem, but fortunately the error is still an ImportError::
  >>> import nul
  ImportError: DLL load failed: Le module spécifié est introuvable.
History
Date User Action Args
2008-06-13 01:18:48amaury.forgeotdarcsetspambayes_score: 0.037023 -> 0.037023
recipients: + amaury.forgeotdarc, ocean-city
2008-06-13 01:18:48amaury.forgeotdarcsetspambayes_score: 0.037023 -> 0.037023
messageid: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za>
2008-06-13 01:18:47amaury.forgeotdarclinkissue3099 messages
2008-06-13 01:18:47amaury.forgeotdarccreate