Miki Tebeka wrote:
> > >From looking at the shelve info in the library reference, I get
> > the impression it's tricky to change the values in the dict for
> > existing keys and be sure they get changed on disk.
> You can use writeback=True or call sync at the right places.
>
>
> > How can you
Peter Otten <__pete...@web.de> wrote:
> Bob Fnord wrote:
> > I started by using cPickle to save the instance of the class that
> > contained this dict, but the pickling process started to write
> > the file but ate so much memory that my computer (4 GB RAM)
> > crashed so badly that I had to pres
> >From looking at the shelve info in the library reference, I get
> the impression it's tricky to change the values in the dict for
> existing keys and be sure they get changed on disk.
You can use writeback=True or call sync at the right places.
> How can you convert a tuple of strings to a str
Bob Fnord wrote:
> I'm using python to do some log file analysis and I need to store
> on disk a very large dict with tuples of strings as keys and
> lists of strings and numbers as values.
>
> I started by using cPickle to save the instance of the class that
> contained this dict, but the pickli
Terry Reedy wrote:
> On 3/7/2011 4:50 AM, Bob Fnord wrote:
>
> > I want a portable data file (can be moved around the filesystem
> > or copied to another machine and used),
>
> Used only by Python or by other software?
just Python
> > Would a database in a file have any advantages over a file
"Martin P. Hellwig" wrote:
> On 05/03/2011 01:56, Bob Fnord wrote:
>
> > Any comments, suggestions?
> >
> No but I have a bunch of pseudo-questions :-)
>
> What version of python are you using? How about your OS and bitspace
> (32/64)? Have you also tried using the non-c pickle module? If the
Miki Tebeka wrote:
> > Or, which situations does shelve suit better and which does
> > marshal suit better?
> shelve ease of use and the fact it uses the disk to store objects makes it a
> good choice if you have a lot of object, each with a unique string key (and a
> tuple of strings can be co
On 3/7/2011 4:50 AM, Bob Fnord wrote:
I want a portable data file (can be moved around the filesystem
or copied to another machine and used),
Used only by Python or by other software?
Would a database in a file have any advantages over a file made
by marshal or shelve?
If you have read the
On 05/03/2011 01:56, Bob Fnord wrote:
Any comments, suggestions?
No but I have a bunch of pseudo-questions :-)
What version of python are you using? How about your OS and bitspace
(32/64)? Have you also tried using the non-c pickle module? If the data
is very simple in structure, perhaps s
Bob Fnord wrote:
> I want a portable data file (can be moved around the filesystem
> or copied to another machine and used), so I don't want to use
> mysql or postgres. I guess the "sqlite" approach would work, but
> I think it would be difficult to turn the tuples of strings and
> lists of string
MRAB wrote:
> On 05/03/2011 01:56, Bob Fnord wrote:
> > I'm using python to do some log file analysis and I need to store
> > on disk a very large dict with tuples of strings as keys and
> > lists of strings and numbers as values.
> >
> > I started by using cPickle to save the instance of the cla
GSO wrote:
> On 5 March 2011 02:14, MRAB wrote:
> ...
> >> Any comments, suggestions?
> >>
>
> You obviously can't feed your computer pickles then.
>
> How about a tasty tidbit of XML? Served up in a main dish of DOM, or
> serially if preferred?
Well, right now it takes three lines to save t
> Or, which situations does shelve suit better and which does
> marshal suit better?
shelve ease of use and the fact it uses the disk to store objects makes it a
good choice if you have a lot of object, each with a unique string key (and a
tuple of strings can be converted to and from a string).
Miki Tebeka wrote:
> > I'm using python to do some log file analysis and I need to store
> > on disk a very large dict with tuples of strings as keys and
> > lists of strings and numbers as values.
> I recommend that you'll use the shelve module. It stores data on disk and is
> more memory effic
> I'm using python to do some log file analysis and I need to store
> on disk a very large dict with tuples of strings as keys and
> lists of strings and numbers as values.
I recommend that you'll use the shelve module. It stores data on disk and is
more memory efficient than in-memory pickle obje
On 5 March 2011 02:14, MRAB wrote:
...
>> Any comments, suggestions?
>>
You obviously can't feed your computer pickles then.
How about a tasty tidbit of XML? Served up in a main dish of DOM, or
serially if preferred?
--
http://mail.python.org/mailman/listinfo/python-list
On 05/03/2011 01:56, Bob Fnord wrote:
I'm using python to do some log file analysis and I need to store
on disk a very large dict with tuples of strings as keys and
lists of strings and numbers as values.
I started by using cPickle to save the instance of the class that
contained this dict, but
I'm using python to do some log file analysis and I need to store
on disk a very large dict with tuples of strings as keys and
lists of strings and numbers as values.
I started by using cPickle to save the instance of the class that
contained this dict, but the pickling process started to write
th
18 matches
Mail list logo