Re: XML document causes pickle to go into infinite recursion

2007-11-01 Thread Orest Kozyar
> > I'm working on a CGI script that pulls XML data from a public database > > Ah, I missed that bit on first read. Consider using something different than > CGI here if you want to do caching. FCGI would allow you to do in-memory > caching, for example, as would mod_python and a lot of other solut

Re: XML document causes pickle to go into infinite recursion

2007-11-01 Thread Orest Kozyar
> minidom creates a pretty complete tree data structure, with loads of backlinks > to parent elements etc. That's where your circular references come from. > > I don't know why you want to use pickle here (and not serialised XML or the > plain in-memory tree), but if memory consumption is an issue

XML document causes pickle to go into infinite recursion

2007-10-31 Thread Orest Kozyar
I'm working on a CGI script that pulls XML data from a public database (Medline) and caches this data using shelveleto minimize load on the database. In general, the script works quite well, but keeps crashing every time I try to pickle a particular XML document. Below is a script that illustrate