xml marshal of general (but non Python standard) class

2005-03-23 Thread syd
Hello all, 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 str

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

Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-04 Thread syd
I don't even know where to begin. This is just bizarre. I just picked up the Gnuplot.py module (a light interface to gnuplot commands) and was messing around with it today. I've got a tiny script, but it only works from the command line about half the time! In the python interpreter, 100%. Ip

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-05 Thread syd
Thanks for all the help, guys! The affected computer is at home, but I'll address all these issues before I post again with my fix. James: It's on my personal box, and I've got reiserfs. David: OS: GNU/Linux 2.4 (Gentoo) Python 2.3 GNUplot 1.6 I just checked the Gentoo Portage tree and 1.7 is l

Re: Gnuplot.py and, _by far_, the weirdest thing I've ever seen on my computer

2005-04-06 Thread syd
Ok yall, here's my summary. Thanks again for all the help. Most importantly, upgrading to gnuplot-py 1.7 fixes this problem. In gnuplot-py 1.6, this is the bottom line... Does not fix: Gnuplot.GnuplotOpts.prefer_fifo_data = 0 Fixes: Gnuplot.GnuplotOpts.prefer_inline_data = 1 Fixes: (placed b

within a class, redefining self with pickled file

2005-04-07 Thread syd
def unpickle(self): self = pickle.load(open(self.getFilePath('pickle'))) This evidently does not work. Any idea why? I'd like to be able to replace a lightly populated class (enough to identify the pickled version correctly) with it's full version that's sitting pickled in a file. As of right