Re: Addind imports to a class namespace

2009-07-13 Thread Ryan K
Thank you for your replies. I have factored out the dependency and everything is solved. Cheers, Ryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Addind imports to a class namespace

2009-07-11 Thread Ryan K
Okay so below is the acutal code. I am starting to think there is no reason why I can't install the post_save signal in signals.py itself and thereby avoid this issue entirely. models.py: class Link(CommonAbstractModel): ... class Menu(CommonAbstractModel): class StaticPage(CommonA

Re: Re: Addind imports to a class namespace

2009-07-11 Thread Dave Angel
Ryan K wrote: Thanks for your help Peter. I'm thinking that perhaps this isn't a circular import and that I don't understand importing. Here is a better explanation of my case (I am using Django): I have file x.py that declares classes A, B, C. There is also a file y.py that contains two metho

Re: Addind imports to a class namespace

2009-07-11 Thread Peter Otten
Ryan K wrote: > I'm thinking that perhaps this isn't a circular import and that I > don't understand importing. Here is a better explanation of my case (I > am using Django): > > I have file x.py that declares classes A, B, C. Classes in Python are executable code, just like import-statements. T

Re: Addind imports to a class namespace

2009-07-11 Thread Ryan K
Thanks for your help Peter. I'm thinking that perhaps this isn't a circular import and that I don't understand importing. Here is a better explanation of my case (I am using Django): I have file x.py that declares classes A, B, C. There is also a file y.py that contains two methods T, U and the

Re: Addind imports to a class namespace

2009-07-10 Thread Peter Otten
Ryan K wrote: > In order to avoid circular imports, I have a class that I want to > improve upon: > > Class GenerateMenuXhtml(threading.Thread): > """ > Subclasses a threading.Thread class to generate a menu's XHTML in > a separate > thread. All Link objects that have this menu associ

Addind imports to a class namespace

2009-07-10 Thread Ryan K
Greetings, In order to avoid circular imports, I have a class that I want to improve upon: Class GenerateMenuXhtml(threading.Thread): """ Subclasses a threading.Thread class to generate a menu's XHTML in a separate thread. All Link objects that have this menu associated with it are ga