Skip to content

Conversation

davep
Copy link
Contributor

@davep davep commented Sep 13, 2023

Fixes #3237

See Textualize/textual-dev#19 for the background to this.

@davep davep marked this pull request as ready for review September 28, 2023 13:07
self._devtools_redirector.write(text)
current_frame = inspect.currentframe()
self._devtools_redirector.write(
text, current_frame.f_back if current_frame is not None else None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the previous frame is the one where print was called?
Can you briefly explain how a call to print ends up here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you briefly explain how a call to print ends up here?

Not off the top of my head; I don't recall going near that.

@davep davep merged commit 3aaecd3 into Textualize:main Oct 5, 2023
@davep davep deleted the fix-print-console-location branch October 5, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Task

2 participants