-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Message hook in display publisher #115
Conversation
pinging @minrk @jasongrout |
@@ -70,6 +78,15 @@ def _flush_streams(self): | |||
sys.stdout.flush() | |||
sys.stderr.flush() | |||
|
|||
@default('thread_local') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I think this is the first PR that uses the traitlets 4.1 API, you may want to bump the version requirement in setup.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Master is already at 4.2 -
so i'll just merge on that.
Thanks!
Nice start! |
@minrk @jasongrout now has comprehensive tests over the new hook functionality - your call on whether we merge and iterate or carry on. |
------- | ||
None | ||
|
||
The DisplayHook objects must return a message from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these are DisplayHook objects since DisplayHook is called on objects, not messages. I think it's any callable with:
def hook(message) => message or None
Awesome, thanks @dwillmer! I made one comment in-line about DisplayHook, but I think we can merge and move on shortly. |
@minrk - Fixed, thanks! |
Thanks! |
Similar to ipython#115 but for stdout/stderr This can be useful for a thread to redirect stdout/stderr to a file, while other threads can still write to stdout/stderr.
This is the initial work for #113.