[IronPython] CPython reflector (work-in-progress)

Dino Viehland dinov at exchange.microsoft.com
Thu Jun 8 17:25:13 CEST 2006

To get a better stack trace I would suggest you run w/ -X:ExceptionDetail command line option which will give you the raw exception info thrown by the CLR.  By default we exclude all of the IronPython, mscorlib, etc... frames and just give you the frames that you presumably would be interested in (and that would be the same as what CPython displays).  But -X:ExceptionDetail will flip that off.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan Jacobs
Sent: Thursday, June 08, 2006 7:03 AM
To: Discussion of IronPython
Subject: Re: [IronPython] CPython reflector (work-in-progress)

Sanghyeon Seo wrote:
> This is a CPython reflector, using ctypes. With ctypes for IronPython
> I posted today, this can be run both on CPython and on IronPython.
> When finished, this should allow importing CPython native modules in IronPython.

This is a very cool idea, except I'm running into an issue. I've made a modification to reflect.txt, I changed the DLL name from "libpython2.3.so" to "python24.dll".

(creflect.py is your reflect.txt attachment with my modification, ctypes.py is

 >>> import creflect
Traceback (most recent call last):
   File , line 0, in PyInt_AsLong
   File , line 0, in <stdin>##5
   File , line 0, in __import__##3
   File C:\Documents and Settings\JJ\Desktop\IronPython-1.0-Beta7\creflect.py,
line 64, in Initialize
   File C:\Documents and Settings\JJ\Desktop\IronPython-1.0-Beta7\creflect.py,
line 62, in cimport
   File C:\Documents and Settings\JJ\Desktop\IronPython-1.0-Beta7\creflect.py,
line 47, in unwrap
   File ctypes, line unknown, in __call__
   File C:\Documents and Settings\JJ\Desktop\IronPython-1.0-Beta7\ctypes.py,
line 84, in __call__
StandardError: Exception has been thrown by the target of an invocation.

(Bit of a bizarrely structured stack trace!)

When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
                 -- Rinzai, ninth century Zen master _______________________________________________
users mailing list
users at lists.ironpython.com

More information about the Ironpython-users mailing list