Yes, exactly. I have found the same. Build the shared library (with C-compatible interfaces) and that’s all you need. To me that is way easier and more portable. (vs trying to fight SWIG to get it to do what you want and then deal with extra platform and/or python-specific libs floating around. i’ve never used f2py).
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Interfacing Fortran code from Python | 16 | 5503 | October 6, 2021 | |
| Interact with python -- f2py or ctypes? | 7 | 2676 | July 30, 2021 | |
|
About f2py, IPC and Wrappers
|
13 | 1854 | September 15, 2021 | |
|
Interfacing Fortran with Python in 2025
|
17 | 1042 | March 23, 2025 | |
| bind(C) philosophy: pointer-by-value or type-by-reference? | 12 | 1057 | July 3, 2022 |