In article 78388a7a-b148-499a-8894-34e55721e...@k19g2000pro.googlegroups.com,
lordofcode ajay@gmail.com wrote:
Thanks you all for your replies ,cleared quiet a few doubts about
importing modules and namespace references .
Currently am going with static importing of all modules. But it may
Steven D'Aprano wrote:
On Wed, 23 Dec 2009 15:31:53 +0100, Jean-Michel Pichavant wrote:
Steven D'Aprano wrote:
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote:
But believe me, you don't want to mess up with the python import
mechanism.
On 12/24/2009 11:51 PM, Jean-Michel Pichavant wrote:
But what he *can* do is to learn how importing works. I'm not sure
it's terribly helpful to tell somebody all the things they can't do
instead of what they can.
Hacking python imports would not be in the top of the list of things I
would
Hi All
Not an expert in Python, so sorry if this sounds like a silly
question.
I went through other few threads in the mailing list but they are not
helping me much.
I have run into a problem related to dynamically loading and unloading
a module.
I need to dynamically load a module and unload it
On 12/23/2009 8:41 PM, lordofcode wrote:
Hi All
Not an expert in Python, so sorry if this sounds like a silly
question.
I went through other few threads in the mailing list but they are not
helping me much.
I have run into a problem related to dynamically loading and unloading
a module.
I need
lordofcode wrote:
Hi All
Not an expert in Python, so sorry if this sounds like a silly
question.
I went through other few threads in the mailing list but they are not
helping me much.
I have run into a problem related to dynamically loading and unloading
a module.
I need to dynamically load a
Jean-Michel Pichavant wrote:
lordofcode wrote:
Hi All
Not an expert in Python, so sorry if this sounds like a silly
question.
I went through other few threads in the mailing list but they are not
helping me much.
I have run into a problem related to dynamically loading and unloading
a module.
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote:
3/ if you really need to unload the previous module, it's a little bit
tedious.
import mod1
del mod1
sys.modules['mod1'] = None
Assigning sys.modules[name] to None is not the same as deleting the
entry. None has special
On Wed, 23 Dec 2009 01:41:27 -0800, lordofcode wrote:
I need to dynamically load a module and unload it and load another
module.
Why bother unloading it? Unless you're programming for an embedded
device, it's highly unlikely that you're so strapped for memory that a
module will make any real
Steven D'Aprano wrote:
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote:
But believe me, you don't want to mess up with the python import
mechanism.
Unless you understand how it works.
Let me quote the OP: 'Not an expert in Python'
I was just answering the OP
Steven D'Aprano wrote:
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote:
3/ if you really need to unload the previous module, it's a little bit
tedious.
import mod1
del mod1
sys.modules['mod1'] = None
Assigning sys.modules[name] to None is not the same as deleting
On Wed, 23 Dec 2009 15:31:53 +0100, Jean-Michel Pichavant wrote:
Steven D'Aprano wrote:
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote:
But believe me, you don't want to mess up with the python import
mechanism.
Unless you understand how it works.
Let me
On Dec 23, 7:40 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote:
3/ if you really need to unload the previous module, it's a little bit
tedious.
import mod1
del mod1
sys.modules['mod1'] = None
Assigning
Hi All,
Thanks you all for your replies ,cleared quiet a few doubts about
importing modules and namespace references .
Currently am going with static importing of all modules. But it may
not be efficient in future as the number of interchangeable modules
that I have to import may run in
On Wed, 23 Dec 2009 15:18:10 -0800, Carl Banks wrote:
# will unload mod1 assuming mod1 was the only reference to that
module.
Which is highly unlikely. Any classes or functions from the module will
keep the module alive.
Actually, they won't. Neither classes nor functions directly
lordofcode wrote:
Hi All
Not an expert in Python, so sorry if this sounds like a silly
question.
I went through other few threads in the mailing list but they are not
helping me much.
I have run into a problem related to dynamically loading and unloading
a module.
I need to dynamically
16 matches
Mail list logo