pickle.load not working?

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sun Aug 14 16:04:06 EDT 2005


In <1123884180.348659.247960 at z14g2000cwz.googlegroups.com>,
sp1d3rx at gmail.com wrote:

> it reads a file saved this way:
> ----------------------
> import pickle
> 
> class chatuser: #container for storing user information...
>     login = ""
>     authcode = ""
>     cookie = ""
>     ip = ""
>     loggedin = 0
>     invalid_logins = 0
>     allow_login = 1
>     status = ""
>     realname = ""
>     phone = ""
>     email = ""
> 
> derek = chatuser

If this is copy and pasted and not just a typo then `derek` is just
another name for the `chatuser` class now and not an *instance* of it.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list