Pickle Problem

Jerry Hill malaclypse2 at gmail.com
Thu Mar 15 16:32:28 CET 2007

On 15 Mar 2007 08:13:53 -0700, tonyr1988 <tonyr1988 at gmail.com> wrote:
> if __name__=='__main__':
>         x = DemoClass
>         x.WriteToFile

Here, you're binding the Class DemoClass to the name x.  What you
probably meant to do is create a new instance of DemoClass, and bind
that to name x, like this:

if __name__=='__main__':
         x = DemoClass()

When I make that change, your code appears to work fine.


More information about the Python-list mailing list