I have created a library in c++ to perform string matching, and am trying to port the code into python using SWIG. I have created a .i file, and have generated a .py file. In testing the file, everything has been working, and I have been able to access the functions and classes as expected. However, the problem I am running into is now when trying to use the code in a more complex environment, I am running into an error because of these lines in my generated .py file.
# Import the low-level C/C++ module
if __package__ or "." in __name__:
from . import _EESM
else:
import _EESM
For my project, EESM.py is my created python file, and inside it there is an import for _EESM.py, with the underscore. I use PyCharm for writing code and it warns me that no module _EESM is found. When attempting to run the project, the same error occurs. I thought that maybe it was referring to the _EESM.so file that was generated by SWIG, but whenever I placed that file in my directory I still received the same errors. The question I have is what do I do with the _{File_Name} module, and how do I find it?