Pickle Problem
Jerry Hill
malaclypse2 at gmail.com
Thu Mar 15 11:32:28 EDT 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()
x.WriteToFile
When I make that change, your code appears to work fine.
--
Jerry
More information about the Python-list
mailing list