Re: Shell question (simple)

2007-01-25 Thread Waylan Limberg
On 1/25/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > [snip] > > An object's behavior is determined both by its state (the > self.__dict__ attribute) and its class (the self.__class__ attribute). > > reload() doesn't go change the __class__ of all the objects which were > created before reload was

Re: Shell question (simple)

2007-01-25 Thread Jeremy Dunck
On 1/25/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > Well, there are a number of things going on here. > A demo of not changing existing objects: >>> class X(object): ...: def y(self): ...: return 1 ...: ...: >>> x = X() >>> x.y() 1 >>> x.x() -

Re: Shell question (simple)

2007-01-25 Thread Jeremy Dunck
On 1/25/07, Tom Smith <[EMAIL PROTECTED]> wrote: ... > from whatever.models import * > site = Site.objects.all()[0] > site.gsearch("fields") > > now at this point, if i get an error, because I have used "from > xxx import yyy" ... I can't reload x or y... which means I have to Well, there ar

Shell question (simple)

2007-01-25 Thread Tom Smith
I'm probably missing some basic python convensions about importing modules, but...I've been trying to work with my model and get it all working before working with the views. Normally, when working with normal python scripts I'd do something like this.. import google_utils as g print g.sear