Re: semi-newbie module namespace confusion

2005-10-07 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > The main jist of the problem is that I'm trying add data from one > module to a list and a dictionary in another module, and it doesn't > seem to stick over there. It's probably best to avoid any circular depentencies, but as long as you make sure you really use your mod

Re: semi-newbie module namespace confusion

2005-10-04 Thread pnau
I'm not going to quote anything (except a URI), but thanks very much for your help, especially http://effbot.org/zone/import-confusion.htm. Almost certainly the source (and solution) to my problem lies in what you guys have brought out. I'm no longer stuck (at least I hope not), and I have knowl

Re: semi-newbie module namespace confusion

2005-10-04 Thread Andrew Gwozdziewycz
well, in my opinion python is not trying hard enough. to me it isimmediately obvious that the main module gets evaluated twice andi am rather sure that one could introduce some magic of the kind"oh, i reevaluate the main script here, the module does not get filledthe usual way but uses the existing

Re: semi-newbie module namespace confusion

2005-10-04 Thread David Murmann
Fredrik Lundh wrote: > David Murmann wrote: > >> I ran into the same problem some time ago and even wanted to post here >> about it, but found out that it had been reported as a bug three times >> at sourceforge (if i remember correctly). The comments there explained >> it of course, but I still t

Re: semi-newbie module namespace confusion

2005-10-04 Thread Fredrik Lundh
David Murmann wrote: > I ran into the same problem some time ago and even wanted to post here > about it, but found out that it had been reported as a bug three times > at sourceforge (if i remember correctly). The comments there explained > it of course, but I still think that this behavior is so

Re: semi-newbie module namespace confusion

2005-10-04 Thread David Murmann
Fredrik Lundh wrote: > running a piece of python code as a script isn't the same thing as > importing it as a module: I ran into the same problem some time ago and even wanted to post here about it, but found out that it had been reported as a bug three times at sourceforge (if i remember correctl

Re: semi-newbie module namespace confusion

2005-10-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > The main jist of the problem is that I'm trying add data from one > module to a list and a dictionary in another module, and it doesn't > seem to stick over there. > > The programs below seem to illustrate the issue. (The results follow > the programs). > Why are the re

semi-newbie module namespace confusion

2005-10-03 Thread pnau
I've stuck my neck out and am in the integration stage of a rather important project at my company, which wears dot net blinders. The program is not too big: I've cranked out 3K lines of code, quite a bit of which is unit tested, but my eyes are starting to glaze, and now I'm stuck (and not just m