[Ironpython-users] pyc port to IKVM.Reflection

Jeff Hardy jdhardy at gmail.com
Fri Jul 6 21:53:07 CEST 2012

On Fri, Jul 6, 2012 at 12:34 PM, Dino Viehland <dinov at microsoft.com> wrote:
> Jeff wrote:
>> Android has some limitations around what you can inherit from. It requires
>> some AOT steps to inherit from Java classes ... which includes all of the UI
>> widgets. I was hand-crafting the wrappers that just forward to Python code,
>> but I figured there had to be an easier way, and pyc.py (or similar) seems like
>> the ticket.
> Not quite sure how this fits in with Java and Android, but throwing those out
> of the picture (let's say we're on the Windows Phone 7 and we don't have access
> to RefEmit), this too can actually potentially be handled by __clrtype__ :)

The full explanation is at
http://docs.xamarin.com/android/about/limitations and
It's similar to .NET's CCW support.

> You'll just need to run NewTypeMaker in a mode where it saves to disk (we
> can already do this I believe for debug builds where we want to verify the
> IL is legal).  Then you just need a metaclass which goes off to the
> pre-compiled assembly and loads it rather than generating it.
> I can definitely see the desire to bring it all together in one tool though as
> there's now lots of moving parts.

Yeah, -X:SaveAssemblies. Super useful, but it requires running the
code, and I'd like to avoid that when generating the wrappers if
possible. With some annotations (and maybe some assumptions), all of
the information needed can be in the source code.

- Jeff

More information about the Ironpython-users mailing list