[IronPython] IronPython and serializing object and a few questions

Mikołaj Dawidowski dawm at teko.com.pl
Mon Dec 5 09:50:09 CET 2005


Hello all,
 
.NET and IronPython +WPF is a great combination. Looking forward to use its
final version
I started educating myself on those 3 and have some questions:
 
1. How to serialize IronPython objects? I have some apps written in "normal"
Python and use gnosis.xml.pickle to save and load data.
I tried to load pickle, gnosis.xml.pickle from IronPythonConsole but this is
what I got.
 
IronPython 0.9.3 on .NET 2.0.50215.322
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import sys
>>> sys.path.append("c:/python24/lib")
>>> sys.path.append("c:/python24/libs")
>>> import gnosis.xml.pickle
Traceback (most recent call last):
   at <shell>
ImportError: No module named gnosis.xml.pickle
>>> import pickle
Traceback (most recent call last):
   at <shell>
   at pickle.Initialize() in c:\python24\lib\pickle.py:line 32
ImportError: No module named marshal
>>> import cPickle
Traceback (most recent call last):
   at <shell>
ImportError: No module named cPickle
>>>
 
I saw the tutorial in 0.9.5 distro - but
sys.LoadAssemblyByName("System.Xml") doesn't do exactly what pickle does,
does it?
 
2. I have .NET with WinFX from September 2005 CTP and IronPython 0.9.3 works
but 0.9.5 requries newer .NET.
 .NET version and WinFX September 2005 CTP 
IronPython 0.9.3 on .NET 2.0.50215.322
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import sys
>>>
 
This is what 0.9.5 whine: "0.9.5 To run this application, you first must
install one of the following versions of the .NET Framework: v2.0.50727"
 
So i guess this is telling me to update my .NET wright? :) Ok, my question
is not so pythonic but I think you guys have experience.
Do I have to uninstall whole WinFX SDK and after installing new .NET install
it again? And  the most important:
Will WinFX still working with that new .NET ?
 
3. IronPython generates exec's from scripts. But when executed they crash.
Should they work? Maybe the should be ran differently...
 
Best regards and GREAT WORK!!
 
Nick




More information about the Ironpython-users mailing list