[IronPython] Disappointed
Thomas Heller
theller at ctypes.org
Thu Dec 17 10:13:14 CET 2009
I was excited to see that the latest IronPython release contains ctypes, so I was
tempted to try it out. This is the first time I use IronPython.
However, soon came frustration.
ctypes.wintypes is missing, copying the Python 2.6 ctypes\wintypes.py into place
doesn't make it work either:
c:\>ipy -c "import ctypes.wintypes"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\Programme\IronPython 2.6\Lib\ctypes\wintypes.py", line 23, in c:\Programme\IronPython 2.6\Lib\ctypes\wintypes.py
NotImplementedError: simple type v
c:\>
The same NotImplementedError is raised when I try to import comtypes, which uses this code:
class BSTR(_SimpleCData):
"The windows BSTR data type"
_type_ = "X"
...
Ok. Gave up trying out ctypes. Tried to run other scripts that I have written. Snippet from that:
"""
import _winreg
def QueryValue(hkey, valuename, default=0):
if hkey is None:
return default
try:
return _winreg.QueryValue(hkey, valuename)
except WindowsError, detail:
if detail.errno == 2:
return default
raise
"""
Doesn't work either. WindowsError is raised, but detail.errno is None,
detail.winerror also.
Is there any chance of running a working, nontrivial CPython program with
IronPython?
Are the above problems oversights? Missing features?
--
Thanks,
Thomas
More information about the Ironpython-users
mailing list