Re: [Tutor] packages,modules, and module attributes

2005-10-26 Thread Alan Gauld
> I've a question, essentially about the import statement. Suppose I have > two python files, a.py and b.py: OK, I'll have a go although I'm only 90% sure I've got it right... > a.py > > flag = True > > def getFlag(): >return flag > > b.py > > from a import * This imports the nam

[Tutor] packages,modules, and module attributes

2005-10-26 Thread Joris van Zwieten
Hi all, I've a question, essentially about the import statement. Suppose I have two python files, a.py and b.py: a.py flag = True def getFlag(): return flag b.py from a import * now, in the interpreter: >>> import b >>> b.flag True >>> b.flag=False >>> b.flag False >>> b.getFlag