Re: Circular imports (again)

2010-08-10 Thread Frank Millman
"Frank Millman" wrote in message news:i3ov9e$du...@dough.gmane.org... Hi all I know the problems related to circular imports, and I know some of the techniques to get around them. However, I find that I bump my head into them from time to time, which means, I guess, that I have not fully u

Re: Circular imports (again)

2010-08-09 Thread Michael Torrie
On Aug 9, 6:19 am, "Frank Millman" wrote: > It has just happened again. I have organised my code into three modules, > each representing a fairly cohesive functional area of the overall > application. However, there really are times when Module A wants to invoke > something from Module B, ditto fo

Re: Circular imports (again)

2010-08-09 Thread Carl Banks
On Aug 9, 6:19 am, "Frank Millman" wrote: > It has just happened again. I have organised my code into three modules, > each representing a fairly cohesive functional area of the overall > application. However, there really are times when Module A wants to invoke > something from Module B, ditto fo

Re: Circular imports (again)

2010-08-09 Thread Ethan Furman
Frank Millman wrote: Hi all I know the problems related to circular imports... > It has just happened again. I have organised my code into three modules, each representing a fairly cohesive functional area of the overall application. However, there really are times when Module A wants to inv

Re: Circular imports

2007-05-29 Thread jim-on-linux
On Tuesday 29 May 2007 00:08, Carsten Haese wrote: > On Mon, 28 May 2007 23:46:00 -0400, Ron Provost > wrote > > > [...] python is not happy about my circular > > imports [...] > > A circular import is not a problem in itself. > I'm guessing you're running into a situation > like this: > > Module A

Re: Circular imports

2007-05-28 Thread Carsten Haese
On Mon, 28 May 2007 23:46:00 -0400, Ron Provost wrote > [...] python is not happy about my circular imports [...] A circular import is not a problem in itself. I'm guessing you're running into a situation like this: Module A imports module B and then defines an important class. Module B imports

Re: circular imports

2005-05-20 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I'm working with a large code base that I'm slowly trying to fix > "unpythonic" features of. [...] > Insead I'd rather have PYTHONPATH already include '/general/path/' > and then just use: One option you might not have considered, which I find more "pythonic" than envir

Re: circular imports

2005-05-20 Thread "Martin v. Löwis"
[EMAIL PROTECTED] wrote: > All of the __init__.py files are empty and I don't know of any > overlapping of names. Like I said this is code that works fine, I'm > just trying to clean up some things as I go. I see. The problem is that a module in a package is entered into the parent package only

Re: circular imports

2005-05-20 Thread qhfgva
All of the __init__.py files are empty and I don't know of any overlapping of names. Like I said this is code that works fine, I'm just trying to clean up some things as I go. Here are my working examples: x1.py == # how things work in our code now: # called with home/dlee/test/module python

Re: circular imports

2005-05-20 Thread "Martin v. Löwis"
[EMAIL PROTECTED] wrote: > So I thought I'd just add the necessary __init__.py files and then > things would just work. Unfortunately trying this exposed a large > number of circular imports which now cause the files to fail to load. You didn't describe you you created the necessary __init__.py f