Hello,
I'm using cython for fast code execution I do reload() to reuse the module implemented as cyton as another parameter, but it doesn't work. It continues to run with the previous value, not the changed value.
import importlib
import pyximport; pyximport.install(reload_support=True)
from cythonGo import cythonModule_A
modeltext = "123"
modeltext_2 = "456"
cythonModule_A.build(modeltext)
cythonModule_A.run(~~~)
importlib.reload(cythonModule_A)
cythonModule_A.build(modeltext_2)
cythonModule_A.run(~~~)
When I googled, I was told to give reload_support=True and reload(), but this method doesn't work for me (python 3.6). Isn't there a good way?!
python cython
Hello, I'm the author. Eventually, I couldn't find a way, so I took a method of physically reloading. I was going to write a batch script and reload it by spinning for loop, but I can call Python file with Python as below.
import os
for i in range(0,1000):
path = "python R_signle.py {}".format(str(i))
os.system(path)
If you know how to reload the cyton module from the Python file, please let me know.
564 GDB gets version error when attempting to debug with the Presense SDK (IDE)
561 PHP ssh2_scp_send fails to send files as intended
556 Understanding How to Configure Google API Key
555 Who developed the "avformat-59.dll" that comes with FFmpeg?
555 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.