[Python-talk] Modules force recompilation?

Lloyd Kvam python at venix.com
Sat Feb 6 15:13:31 EST 2010


On Sat, 2010-02-06 at 12:34 -0500, Bruce Labitt wrote:
> Reload doesn't seem to alway do what one expects...
> 
> What then is a good way to force the recompilation and module cache
> flush?

I'm not sure what to suggest.  It seems you are using the reload
function since you mention it.

In [26]: import resv_saledetails as rsd

In [27]: reload(rsd)
Out[27]: <module 'resv_saledetails' from
'/home/lkvam/vpark/purchase/resv_saledetails.pyc'>

In [28]: !touch resv_saledetails.py

In [29]: reload(rsd)
Out[29]: <module 'resv_saledetails' from
'/home/lkvam/vpark/purchase/resv_saledetails.py'>

You can see that the second reload (#29) loaded from the source file.

What goes wrong for you when you use reload?



-- 
Lloyd Kvam
Venix Corp
DLSLUG/GNHLUG library
http://dlslug.org/library.html
http://www.librarything.com/catalog/dlslug
http://www.librarything.com/rsshtml/recent/dlslug
http://www.librarything.com/rss/recent/dlslug



More information about the Python-talk mailing list