Why the result same as before modifing py files

Z

zaley

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
 
H

Helmut Jarausch

zaley said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top