[Ironpython-users] Understanding CPython and IronPython linkage

Dino Viehland dinov at microsoft.com
Wed Feb 22 23:36:02 CET 2012


I’m not sure there’s much to worry about with pickle.  I think the biggest issue is that in IronPython we’ll serialize strings as Unicode where CPython would serialize them as ASCII strings.  Once they’re deserialized though everyone should treat them (mostly) the same.

I use pickle to store the completion database for PTVS – there I have CPython and IronPython writing the files and I have a modified version of IronPython’s cPickle implementation to also read/write them from PTVS.  I don’t really do much reading from the CPython side in the product, but I do it all the time for debugging.  I haven’t run into any issues with it.

From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto:ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of Lucas Vickers
Sent: Wednesday, February 22, 2012 2:28 PM
To: Slide
Cc: ironpython-users at python.org
Subject: Re: [Ironpython-users] Understanding CPython and IronPython linkage

Lol now you're scaring me ;)

Rhino3d uses IronPython to let us control low level .net Rhino APIs using python. Super cool. But what about pickle do u need to watch out for?

Due to the Rhino infrastructure it seems difficult to impossible to really debug an IronPython script hosted within rhino, so tracing low level bugs will be a nightmare.

On Feb 22, 2012, at 5:09 PM, Slide <slide.o.mix at gmail.com<mailto:slide.o.mix at gmail.com>> wrote:
Be careful with that too :-) IronPython is obviously still a work in progress and we're trying hard to implement features and become more CPython compatible; we've still got a lot of work to do, but you can do some really cool stuff with IronPython.


slide
On Wed, Feb 22, 2012 at 3:06 PM, Lucas Vickers <lucasvickers at gmail.com<mailto:lucasvickers at gmail.com>> wrote:
Got it. Makes more sense.

Sounds like I'll be pickling objects back and forth between cpy and ipy.

Thanks


On Feb 22, 2012, at 5:03 PM, Slide <slide.o.mix at gmail.com<mailto:slide.o.mix at gmail.com>> wrote:
If the module is a C based module, it will not import into IronPython. The compatibility is in most of the standard library, pycurl is not part of the standard library. There are even issues in parts of the standard library as you can see if you look at the bug tracker on CodePlex.

slide
On Wed, Feb 22, 2012 at 2:43 PM, Lucas Vickers <lucasvickers at gmail.com<mailto:lucasvickers at gmail.com>> wrote:
Hello,

I am OS X and I am working with a pre-compiled version of IronPython (it is hosted by Rhino 3d to be specific).

I am attempting to import standard CPython libraries, such as pycurl.  I am confused as the FAQ states compatibility between IronPython 2.7 and CPython 2.7, but using the following code which works on CPython 2.7.2 fails on IronPython 2.7.0.

sys.path[0:0] = [ '/Users/lucasvickers/.virtualenvs/rhino/lib/python2.7/site-packages' ]
import pycurl

It claims no module pycurl.  A little more reading shows attempts to allow linkage between IronPython and CPython such as ironclad (http://code.google.com/p/ironclad/ ), but then why the claimed compatibility in the first place?

Can anyone help me understand?  thanks

Lucas

_______________________________________________
Ironpython-users mailing list
Ironpython-users at python.org<mailto:Ironpython-users at python.org>
http://mail.python.org/mailman/listinfo/ironpython-users



--
Website: http://earl-of-code.com



--
Website: http://earl-of-code.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120222/05b5b1b9/attachment.html>


More information about the Ironpython-users mailing list