import question

Bjorn Pettersen BPettersen at NAREX.com
Tue Oct 16 17:36:19 CEST 2001


> From: Vojin Jovanovic [mailto:vjovanov at stevens-tech.edu] 
> 
> Suppose I have a file foo.py file that contains a function
> and now I do import foo.   Then, I have my function available
> in python.  But let's suppose that I decide to change the 
> function in foo.py file Why is it that doing import foo again 
> doesn't load the new definition  of the function which would 
> be normal behavior in LISP for example? Because of not having 
> such behavior in Python one has to exit the program and then 
> do import foo in order to load the new definition!?

Well, you could always try 

  reload(module)

-- bjorn




More information about the Python-list mailing list