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

Print over previous output #6423

Open
bdch1234 opened this issue Oct 27, 2020 · 1 comment
Open

Print over previous output #6423

bdch1234 opened this issue Oct 27, 2020 · 1 comment

Comments

@bdch1234
Copy link

Feature request

To write over previous statement without numba, I can just do

print(x, end='\r')

I'd like to do the same in njit-compiled functions, but numba doesn't support keywords in print apparently. Would it be possible to implement? Or is there perhaps some other workaround to get the same behavior?

@esc
Copy link
Member

esc commented Oct 27, 2020

@bdch1234 objectmode blocks might help here:

https://numba.pydata.org/numba-doc/latest/user/withobjmode.html

As long as you don't try to do this within a tight loop, it should be OK performance wise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants