Re: xml marshal of general (but non Python standard) class

2005-03-29 Thread "Martin v. Löwis"
syd wrote: But for my identifiedPeaks class (for instance), it has trouble. This class contains a list of "peak" classes IdentifiedPeaks.Peak... What precisely is the name of the class. You say it is IdentifiedPeaks.Peak, but... from IdentifiedPeaks import IdentifiedPeaks Here you import Identifie

Re: xml marshal of general (but non Python standard) class

2005-03-29 Thread syd
Thank you Martin. I had not considered pickle, and I've done my research. However, I'm still having problems: Your foo class (for pickle and xml dumps) works fine for me. >>> f=Foo() >>> f.thanksTo='Martin' >>> f.howMany=100 >>> pickle.dumps(f) "(i__main__\nFoo\np0\n(dp1\nS'thanksTo'\np2\nS'Mart

Re: xml marshal of general (but non Python standard) class

2005-03-27 Thread "Martin v. Löwis"
In my project, I have container classes holding lists of item classes. For example, a container class myLibrary might hold a list of item classes myNation and associated variables like myNation.name='USA' and myNation.continent='North America'. Bottom line, I was hoping to use this structure to mar