[issue37016] Python embedded in C++ cannot open a file

2019-05-23 Thread Soumya Mohanty
Soumya Mohanty added the comment: Hello Stéphane, I appreciate the reply, but read the docs and they did not resolve my problem. I solved it by adding full paths to the file instead of just there names, even though the file being loaded was in the present working directory and when working

[issue37016] Python embedded in C++ cannot open a file

2019-05-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Soumya, But Py_Initialize and Py_Finalize are not called in this case, and it's not a bug of CPython. I suggest you read this link: https://docs.python.org/3/extending/embedding.html#very-high-level-embedding Thank you -- nosy: +matrixise reso

[issue37016] Python embedded in C++ cannot open a file

2019-05-22 Thread Soumya Mohanty
New submission from Soumya Mohanty : Hello, I am trying to open a pickled file and load it in my python file. This python file will be called from a c++ program. Please find the C++ program attached. Py_Initialize and Py_Finalize are being done in a separate file called pyhelper.hpp Pytho