Tim Golden added the comment:
This one seems to have been fixed by the importlib rebuild. I haven't bothered
to trace the code path, but certainly import nul returns the expected
ImportError: No module named 'nul' in both Debug Release builds.
--
resolution: - works for me
stage: -
Changes by Brett Cannon br...@python.org:
--
nosy: -brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3099
___
___
Python-bugs-list
Mark Mc Mahon mtnbikingm...@gmail.com added the comment:
I am not sure that I fully understand the issue - but it seems that trunk still
has this issue.
As stated by Amaury - this is on DEBUG builds only.
c:\pcbuild\python_d.exe
Python 3.3a0 (default, May 28 2011, 20:22:11) [MSC v.1500 32 bit
Terry J. Reedy tjre...@udel.edu added the comment:
it is likely that the new import library will correct the problem.
Did it?
With standard 3.1.2,
import nul
...
ImportError: DLL load failed: The specified module could not be found.
import con
...
ImportError: No module named con
So is
Éric Araujo mer...@netwok.org added the comment:
3.1 does not use importlib for imports.
--
nosy: +merwok
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3099
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
It's a problem with debug builds on Windows.
Lowering priority.
Also, it is likely that the new import library will correct the problem.
--
priority: - low
___
Python tracker
Brett Cannon br...@python.org added the comment:
Since I don't have access to Windows I am unassigning. Amaury, if this
is still a problem should we go ahead and switch to
GetFileAttributesEx()? Or just realize this is a problem for people
developing Python?
--
assignee: brett.cannon -
Changes by Daniel Diniz aja...@gmail.com:
--
assignee: - brett.cannon
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3099
___
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:
GetFileAttributes() succeeds for nul, but GetFileAttributesEx() fails.
Maybe is it good idea to use GetFileAttributesEx()?
# test code
import ctypes
import ctypes.wintypes as type
dll = ctypes.windll.kernel32
print
Georg Brandl [EMAIL PROTECTED] added the comment:
The title is misleading -- if what you show is correct then import nul
doesn't succeed :)
--
nosy: +georg.brandl
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3099
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Sorry, I was not clear.
With python 2.5.2, import nul correctly raises ImportError, even if
the error message is slightly misleading.
With a recent release25-maint (and all other branches), import nul
does succeed, and creates an empty
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
I was wrong. It seems that an installed python works correctly, but a
python running from its build directory has the problem.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3099
Amaury Forgeot d'Arc [EMAIL PROTECTED] 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
New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]:
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
14 matches
Mail list logo