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

Tee cell output to stdout? #374

Open
j2kun opened this issue Aug 27, 2016 · 10 comments
Open

Tee cell output to stdout? #374

j2kun opened this issue Aug 27, 2016 · 10 comments
Milestone

Comments

@j2kun
Copy link
Contributor

j2kun commented Aug 27, 2016

Hey nbconvert folks, I've got another question:

I've been using nbconvert's execute preprocessor to run some jupyter notebooks from the command line, and I've been wondering if there's a way to tee the cell output to stdout as the notebook runs. Is this currently possible with nbconvert, and if not would it be feasible to add this feature? (I'd be happy to submit a PR)

@j2kun j2kun changed the title Tee output to stdout? Tee cell output to stdout? Aug 27, 2016
@takluyver
Copy link
Member

No, I don't think it's currently possible, but I think it would be a feasible thing to add. Look out for #360, which also changes the relevant code now - if you try to fix this in parallel, the PRs will clash.

@mpacer mpacer added this to the no action milestone Aug 31, 2016
@RoyalTS
Copy link

RoyalTS commented Jan 18, 2019

This would be great to have. Has there been any progress on this? Is it even on anyone's agenda?

@RoyalTS
Copy link

RoyalTS commented Mar 5, 2019

Not a native solution but this does what you want it to do: https://github.com/guoquan/runnb

@InnovArul
Copy link

Just an addition to @RoyalTS's comment. You can install runnb using pip:
pip install runnb
https://pypi.org/project/runnb

@MSeal
Copy link
Contributor

MSeal commented Apr 13, 2019

Also https://papermill.readthedocs.io/en/latest/ has an option to tee outputs, though papermill only does notebook-to-notebook execution (it wraps nbconvert)

@RoyalTS
Copy link

RoyalTS commented Apr 14, 2019

Yeah, I've settled on papermill for this.

@matthewwardrop
Copy link

For anyone looking for not only tee'd output, but also access to the variables created by the notebook, I've created an in-process runner here: https://gist.github.com/matthewwardrop/fe2148923048baabe14edacb2eda0b74 .

@Hoeze
Copy link

Hoeze commented Feb 21, 2021

Is this feature available yet?
Would be useful to track progress in e.g. snakemake.

@MSeal
Copy link
Contributor

MSeal commented Feb 22, 2021

@Hoeze I believe general consensus is still to use papermill for output teeing rather than nbconvert.

@alonme
Copy link

alonme commented Dec 14, 2022

@MSeal - How is this achieved with papermill?

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

No branches or pull requests

9 participants