problem with pickle - Python
This is a discussion on problem with pickle - Python ; hello everybody
I've just started learning python . i stumbled upon this broad
spectrum function 'pickle'
but it is not getting executed as it should
this is what the python interpreter returns on giving the basic
command
>>>pickle.dump(x,f) where x ...
-
problem with pickle
hello everybody
I've just started learning python . i stumbled upon this broad
spectrum function 'pickle'
but it is not getting executed as it should
this is what the python interpreter returns on giving the basic
command
>>>pickle.dump(x,f) where x is a tuple and f is a file object
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'pickle' is not defined
kindly elucidate what's wrong
thanks
-
Re: problem with pickle
K Gaur <gaurkuber> wrote:
> this is what the python interpreter returns on giving the basic
> command
>
> >>>pickle.dump(x,f) where x is a tuple and f is a file object
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> NameError: name 'pickle' is not defined
>
> kindly elucidate what's wrong
You should import the module in the local namespace before using it:
>>> import pickle
>>> pickle.dump
--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
Similar Threads
-
By Application Development in forum Python
Replies: 15
Last Post: 11-02-2007, 02:36 PM
-
By Application Development in forum Python
Replies: 0
Last Post: 11-01-2007, 04:34 PM
-
By Application Development in forum Python
Replies: 0
Last Post: 11-01-2007, 03:59 PM
-
By Application Development in forum Python
Replies: 3
Last Post: 10-04-2007, 12:27 PM
-
By Application Development in forum Python
Replies: 2
Last Post: 09-11-2007, 01:51 PM