Re: delete namespaces

2011-03-30 Thread rusi
On Mar 30, 6:14 am, monkeys paw wrote: > How do i delete a module namespace once it has been imported? > > I use > > import banner > > Then i make a modification to banner.py. When i import it again, > the new changes are not reflected. Is there a global variable i can > modify? It seems you are

Re: delete namespaces

2011-03-30 Thread Ritesh Nadhani
On Tue, Mar 29, 2011 at 6:14 PM, monkeys paw wrote: > How do i delete a module namespace once it has been imported? > > I use > > import banner > > Then i make a modification to banner.py. When i import it again, > the new changes are not reflected. Is there a global variable i can > modify? > --

Re: delete namespaces

2011-03-30 Thread Chris Angelico
On Thu, Mar 31, 2011 at 11:11 AM, Raymond Hettinger wrote: > [monkeys paw] >> > How do i delete a module namespace once it has been imported? >  . . . >> > Then i make a modification to banner.py. When i import it again, >> > the new changes are not reflected. > > [Terry Reedy] >> The best thing,

Re: delete namespaces

2011-03-30 Thread Raymond Hettinger
[monkeys paw] > > How do i delete a module namespace once it has been imported? . . . > > Then i make a modification to banner.py. When i import it again, > > the new changes are not reflected. [Terry Reedy] > The best thing, if possible, is to restart the program. > If you develop banner.py with

Re: delete namespaces

2011-03-30 Thread Tim Golden
On 30/03/2011 8:03 PM, Terry Reedy wrote: On 3/30/2011 5:10 AM, Jean-Michel Pichavant wrote: 3/ if you want to do the 2/ but require a painful long prologue to your test, then you may want to use the builtin reload. Use it with care, because any existing object created from the previous module

Re: delete namespaces

2011-03-30 Thread Terry Reedy
On 3/30/2011 5:10 AM, Jean-Michel Pichavant wrote: 3/ if you want to do the 2/ but require a painful long prologue to your test, then you may want to use the builtin reload. Use it with care, because any existing object created from the previous module will not be affected, they'll still hold th

Re: delete namespaces

2011-03-30 Thread Jean-Michel Pichavant
monkeys paw wrote: How do i delete a module namespace once it has been imported? I use import banner Then i make a modification to banner.py. When i import it again, the new changes are not reflected. Is there a global variable i can modify? It depends on what you want to achieve. 1/ if you

Re: delete namespaces

2011-03-29 Thread Terry Reedy
On 3/29/2011 9:14 PM, monkeys paw wrote: How do i delete a module namespace once it has been imported? I use import banner Then i make a modification to banner.py. When i import it again, the new changes are not reflected. The best thing, if possible, is to restart the program. If you develo

Re: delete namespaces

2011-03-29 Thread Tim Chase
On 03/29/2011 08:14 PM, monkeys paw wrote: How do i delete a module namespace once it has been imported? I use import banner Then i make a modification to banner.py. When i import it again, the new changes are not reflected. Is there a global variable i can modify? Delete it from sys.modules

Re: delete namespaces

2011-03-29 Thread Raymond Hettinger
On Mar 29, 6:14 pm, monkeys paw wrote: > How do i delete a module namespace once it has been imported? . . . > Then i make a modification to banner.py. When i import it again, > the new changes are not reflected. Is there a global variable i can > modify? In Python2.x, you can use the reload() f

delete namespaces

2011-03-29 Thread monkeys paw
How do i delete a module namespace once it has been imported? I use import banner Then i make a modification to banner.py. When i import it again, the new changes are not reflected. Is there a global variable i can modify? -- http://mail.python.org/mailman/listinfo/python-list