Skip to content
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

IPython redirect stdout #84

Open
cjdoris opened this issue Dec 10, 2021 · 2 comments
Open

IPython redirect stdout #84

cjdoris opened this issue Dec 10, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@cjdoris
Copy link
Collaborator

cjdoris commented Dec 10, 2021

We used to set Base.stdout to PyIO(sys.stdout) but this causes bugs so is removed.

Instead copy the IJulia approach: use pipe = redirect_stdout() and have an async task watch the pipe for output and write it to sys.stdout.

@cjdoris cjdoris added the enhancement New feature or request label Dec 10, 2021
@stevengj
Copy link
Member

What PyCall does is to set sys.stdout to Base.stdout and it seems to work fine.

I recently also updated PyCall to install a post-execute hook to flush Python stdio after each cell is executed in IJulia.

But maybe you are talking about JuliaCall from IPython here, not PythonCall from IJulia?

@cjdoris
Copy link
Collaborator Author

cjdoris commented Apr 21, 2022

Yeah exactly, this ticket is about the other side (using JuliaCall from IPython).

@github-actions github-actions bot added the stale Issues about to be auto-closed label Sep 16, 2023
@JuliaPy JuliaPy deleted a comment from github-actions bot Sep 22, 2023
@cjdoris cjdoris removed the stale Issues about to be auto-closed label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants