how can I reload 'from *' ?

Mike 'Cat' Perkonigg blablu at
Tue May 30 04:24:56 EDT 2000

greg at (Greg Ewing) wrote in 
<39333E51.B612DEAE at>:

>Or more precisely, although you can
>   import HUGO
>   reload(HUGO)
>to reload the module HUGO, that won't make any difference 
>to the values you've already imported from it into the 
>namespaces of other modules.
>On the other hand, if you just 'import HUGO' and then
>use HUGO.whatever everywhere, there is no problem.
>YARNTUFMI* (yet another reason not to use 'from module import *').

I keep one class definition in one file, because I try to keep them easily 
maintainable. But in my program I want to have the class definitions in one 
module because they should be easily reachable. Another code block checks 
the class files and reloads them if changed.
Thats the reason why I have to use these strange constructs.


More information about the Python-list mailing list