ble.com/writing-large-dictionaries-to-file-using-cPickle-tp21708938p23246693.html
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks! All fixed!
--
http://mail.python.org/mailman/listinfo/python-list
mmcclaf wrote:
On Feb 6, 3:09 pm, MRAB wrote:
mmcclaf wrote:
On Feb 6, 10:25 am, Steve Holden wrote:
mmcclaf wrote:
Hi there,
I have to make a small database using cPickle. I'm having troubles
trying to read in the information if it's more than one line. I'm
pretty sure i
On Feb 6, 3:09 pm, MRAB wrote:
> mmcclaf wrote:
> > On Feb 6, 10:25 am, Steve Holden wrote:
> >> mmcclaf wrote:
> >>> Hi there,
> >>> I have to make a small database using cPickle. I'm having troubles
> >>> trying to read in the informa
mmcclaf wrote:
On Feb 6, 10:25 am, Steve Holden wrote:
mmcclaf wrote:
Hi there,
I have to make a small database using cPickle. I'm having troubles
trying to read in the information if it's more than one line. I'm
pretty sure it's in the line "for line in stuff
On Feb 6, 10:25 am, Steve Holden wrote:
> mmcclaf wrote:
> > Hi there,
>
> > I have to make a small database using cPickle. I'm having troubles
> > trying to read in the information if it's more than one line. I'm
> > pretty sure it's in the li
mmcclaf wrote:
> Hi there,
>
> I have to make a small database using cPickle. I'm having troubles
> trying to read in the information if it's more than one line. I'm
> pretty sure it's in the line "for line in stuff:" Can anyone help me
> out
Hi there,
I have to make a small database using cPickle. I'm having troubles
trying to read in the information if it's more than one line. I'm
pretty sure it's in the line "for line in stuff:" Can anyone help me
out? Basically the end result is wanting it to look som
On Jan 30, 2:44 pm, perfr...@gmail.com wrote:
> On Jan 28, 6:08 pm, Aaron Brady wrote:
>
>
>
> > On Jan 28, 4:43 pm, perfr...@gmail.com wrote:
>
> > > On Jan 28, 5:14 pm, John Machin wrote:
>
> > > > On Jan 29, 3:13 am, perfr...@gmail.com wrote:
>
> > > > > hello all,
>
> > > > > i have a large d
On Jan 28, 6:08 pm, Aaron Brady wrote:
> On Jan 28, 4:43 pm, perfr...@gmail.com wrote:
>
> > On Jan 28, 5:14 pm, John Machin wrote:
>
> > > On Jan 29, 3:13 am, perfr...@gmail.com wrote:
>
> > > > hello all,
>
> > > > i have a large dictionary which contains about 10 keys, each key has a
> > > > v
En Wed, 28 Jan 2009 14:13:10 -0200, escribió:
i have a large dictionary which contains about 10 keys, each key has a
value which is a list containing about 1 to 5 million (small)
dictionaries. for example,
mydict = {key1: [{'a': 1, 'b': 2, 'c': 'hello'}, {'d', 3, 'e': 4, 'f':
'world'}, ...],
On Jan 29, 9:43 am, perfr...@gmail.com wrote:
> On Jan 28, 5:14 pm, John Machin wrote:
>
>
>
> > On Jan 29, 3:13 am, perfr...@gmail.com wrote:
>
> > > hello all,
>
> > > i have a large dictionary which contains about 10 keys, each key has a
> > > value which is a list containing about 1 to 5 milli
On Jan 28, 4:43 pm, perfr...@gmail.com wrote:
> On Jan 28, 5:14 pm, John Machin wrote:
>
>
>
> > On Jan 29, 3:13 am, perfr...@gmail.com wrote:
>
> > > hello all,
>
> > > i have a large dictionary which contains about 10 keys, each key has a
> > > value which is a list containing about 1 to 5 milli
On Jan 28, 5:14 pm, John Machin wrote:
> On Jan 29, 3:13 am, perfr...@gmail.com wrote:
>
>
>
> > hello all,
>
> > i have a large dictionary which contains about 10 keys, each key has a
> > value which is a list containing about 1 to 5 million (small)
> > dictionaries. for example,
>
> > mydict = {
On Jan 29, 3:13 am, perfr...@gmail.com wrote:
> hello all,
>
> i have a large dictionary which contains about 10 keys, each key has a
> value which is a list containing about 1 to 5 million (small)
> dictionaries. for example,
>
> mydict = {key1: [{'a': 1, 'b': 2, 'c': 'hello'}, {'d', 3, 'e': 4, 'f
On Jan 28, 10:13 am, perfr...@gmail.com wrote:
> hello all,
>
> i have a large dictionary which contains about 10 keys, each key has a
> value which is a list containing about 1 to 5 million (small)
> dictionaries. for example,
snip
> but this takes just as long... any ideas ? is there a different
perfr...@gmail.com schrieb:
> but this takes just as long... any ideas ? is there a different module
> i could use that's more suitable for large dictionaries ?
> thank you very much.
Have a look at ZODB.
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 28, 11:32 am, pyt...@bdurham.com wrote:
> Hi,
>
> Change:
>
> pickle.dump(mydict, pfile)
>
> to:
>
> pickle.dump(mydict, pfile, -1 )
>
> I think you will see a big difference in performance and also a much
> smaller file on disk.
>
> BTW: What type of application are you developing that crea
Hi,
Change:
pickle.dump(mydict, pfile)
to:
pickle.dump(mydict, pfile, -1 )
I think you will see a big difference in performance and also a much
smaller file on disk.
BTW: What type of application are you developing that creates so many
dictionaries? Sounds interesting.
Malcolm
--
http://mail
hello all,
i have a large dictionary which contains about 10 keys, each key has a
value which is a list containing about 1 to 5 million (small)
dictionaries. for example,
mydict = {key1: [{'a': 1, 'b': 2, 'c': 'hello'}, {'d', 3, 'e': 4, 'f':
'world'}, ...],
key2: [...]}
in total
[Tim Peters]
>> What is "XWwz"? Assuming it's a bizarre typo for "open", change the
>> 'w' there to 'wb'. Pickles are binary data, and files holding pickles
>> must be opened in binary mode, especially since:
>>
>>> ...
>>> (on WinXP, CPython 2.4.1)
[Rune Strand]
> Thanks Tim. The bizarre 'typo
[Tim Peters]
> What is "XWwz"? Assuming it's a bizarre typo for "open", change the
> 'w' there to 'wb'. Pickles are binary data, and files holding pickles
> must be opened in binary mode, especially since:
>
> > ...
> > (on WinXP, CPython 2.4.1)
Thanks Tim. The bizarre 'typo' appears to be cause
[Rune Strand]
> I'm experiencing strange errors both with pickle and cPickle in the
> below code:
>
>
> import cPickle as pickle
> #import pickle
> from string import ascii_uppercase
> from string import ascii_lowercase
>
> def createData():
>d1 = list("Something's rotten")
>d2 = tuple('in
I'm experiencing strange errors both with pickle and cPickle in the
below code:
import cPickle as pickle
#import pickle
from string import ascii_uppercase
from string import ascii_lowercase
def createData():
d1 = list("Something's rotten")
d2 = tuple('in the state of Denmark')
d3 =
24 matches
Mail list logo