'dict' object has no attribute 'readline'
dumps load(well i dont know but i get no complaint but running load
generates that error)
What about *READING THAT FUCKING MANUAL* ?
http://docs.python.org/lib/node316.html
"""
dump(obj, file[, protocol])
Write a pickled representation of obj to the open file object
file. This is equivalent to Pickler(file, protocol).dump(obj).
If the protocol parameter is omitted, protocol 0 is used. If
protocol is specified as a negative value or HIGHEST_PROTOCOL, the
highest protocol version will be used.
Changed in version 2.3: Introduced the protocol parameter.
file must have a write() method that accepts a single string
argument. It can thus be a file object opened for writing, a StringIO
object, or any other custom object that meets this interface.
load(file)
Read a string from the open file object file and interpret it as a
pickle data stream, reconstructing and returning the original object
hierarchy. This is equivalent to Unpickler(file).load().
file must have two methods, a read() method that takes an integer
argument, and a readline() method that requires no arguments. Both
methods should return a string. Thus file can be a file object opened
for reading, a StringIO object, or any other custom object that meets
this interface.
This function automatically determines whether the data stream was
written in binary mode or not.
"""
Example use:
{'a': 1, 'b': 2}
Now : it's not the first time - in a couple days - that you ask a
question that you wouldn't have asked if you had taken a couple
minutes doing the tutorial and/or reading the doc. This newsgroup is
*very* tolerant (in most other places on usenet, you would have get a
raw RTFM on the first question, and a PLONK on the second), but there
are still limits, and as far as I'm concerned you're not far from
them. So do yourself and the world a favour, read this:
http://catb.org/~esr/faqs/smart-questions.html
and then this:
http://docs.python.org/tut/tut.html
and next time someone points you to a specific module, have mercy and
*read* the doc before posting.
As far as I'm concerned, I won't anwser any of your questions unless
it's obvious that you have followed these advices (but then I'll be
happy to help if I can).- Hide quoted text -
- Show quoted text -