Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-31 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > Hi, > > I am new to python and am currently writing my first application. One > of the problems I quickly ran into, however, is that python's imports > are very different from php/C++ includes in the sense that they > completely wrap the imported script in a module objec

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-31 Thread Michael L Torrie
On Fri, 2006-10-27 at 14:53 -0700, [EMAIL PROTECTED] wrote: > Hi, > > I am new to python and am currently writing my first application. One > of the problems I quickly ran into, however, is that python's imports > are very different from php/C++ includes in the sense that they > completely wrap th

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-28 Thread ggmailalias-cgag
robert ha escrito: > [EMAIL PROTECTED] wrote: > > Hi, > > > > I am new to python and am currently writing my first application. One > > of the problems I quickly ran into, however, is that python's imports > > are very different from php/C++ includes in the sense that they > > completely wrap the

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-28 Thread robert
[EMAIL PROTECTED] wrote: > Hi, > > I am new to python and am currently writing my first application. One > of the problems I quickly ran into, however, is that python's imports > are very different from php/C++ includes in the sense that they > completely wrap the imported script in a module objec

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi, > > I am new to python and am currently writing my first application. One > of the problems I quickly ran into, however, is that python's imports > are very different from php/C++ includes in the sense that they > completely wrap the imported script in a module obj

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-27 Thread Gabriel Genellina
At Friday 27/10/2006 19:48, [EMAIL PROTECTED] wrote: Wouldn't importing and re-importing the same modules cause considerable resource bulk? Or does python cache that stuff? No. Once a module is imported by the first time, the module object is placed in sys.modules; if a subsequent import find

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-27 Thread Farshid Lashkari
[EMAIL PROTECTED] wrote: > Wouldn't importing and re-importing the same modules cause considerable > resource bulk? Or does python cache that stuff? If a module is already imported, then the import statement just uses the cached module. However, you can force a full reload of the module using th

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-27 Thread noamsml
Wouldn't importing and re-importing the same modules cause considerable resource bulk? Or does python cache that stuff? On Oct 27, 6:28 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Friday 27/10/2006 18:53, [EMAIL PROTECTED] wrote: > > >I am new to python and am currently writing my first

Re: What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-27 Thread Gabriel Genellina
At Friday 27/10/2006 18:53, [EMAIL PROTECTED] wrote: I am new to python and am currently writing my first application. One of the problems I quickly ran into, however, is that python's imports are very different from php/C++ includes in the sense that they completely wrap the imported script in

What is the cleanest way to for a module to access objects from the script that imports it?

2006-10-27 Thread noamsml
Hi, I am new to python and am currently writing my first application. One of the problems I quickly ran into, however, is that python's imports are very different from php/C++ includes in the sense that they completely wrap the imported script in a module object. One of the problems with this was