Why the result same as before modifing py files

Helmut Jarausch jarausch at skynet.be
Wed Feb 20 10:25:40 CET 2008


zaley wrote:
> In my C++ program ,python is embeded . I import One module(py file)
> and execute some functions .Then I modify py files in order to modify
> func parameters when process is still running .I import the module and
> execute functions again.But I find  the result is same as before

'import' is cached. If do want Python to re-import a <module> just call
reload(<module.)


-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany



More information about the Python-list mailing list