-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output from C++ library not shown on IPython console #9759
Comments
This is fixed in our latest version. Please update by opening Terminal.app and running there
|
I updated to |
Could you use |
Thank you Carlos. Using |
I get a similar problem although the outputs are visible at the end of the C++ run in my case. |
We are having a possibly related issue here: mechmotum/cyipopt#88 FYI |
I make a .pyd with pybind11. The std::cout works fine in Ipython when it is called from the pwsh, but it does not work in spyder. ipython 7.4. spyder 4.2.3. |
There's already a pull request to solve this, we'll try to merge it in the next weeks. |
Issue Report Checklist
conda update Spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)Spyder --reset
Problem Description
I create a Python binding of a C++ code using the library pybind11. The C++ code has a single function that receives an integer N and prints all the integers less than N, one on each line. I run the python part inside Spyder.
When N is small, e.g. N=100, the expected output is obtained. When N is large, e.g. N=100000, no output is obtained and the script hangs.
The problem does not appear if I run from IPython or from terminal or from a jupyter notebook. The same problem appears with pip and conda.
What steps reproduce the problem?
conda install pybind11
Open a file with name
printx.cpp
and paste the following code:What is the expected output? What do you see instead?
The expected output is 100000 integers printed on the screen, one on each line. Instead, nothing is printed on screen and the python script hangs.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: