I have a C++ code that I run and use it's functions from Python. My question is - how do I stop that code from running (like ctrl+c if it was in console) and then restart, but only the c++ part, the rest of python should work as before.
Here is how I use the c++ code:
from os.path import abspath, dirname, join
fname = abspath(inspect.getfile(inspect.currentframe()))
lib = ctypes.cdll.LoadLibrary(join(dirname(fname), 'shared_lib.so'))
func = lib.func
func.restype = None
func.argtypes= None
Is there a way to re-do it?