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

Query: How to achieve more realtime output #565

Open
JohnDuncanScott opened this issue Nov 3, 2021 · 2 comments
Open

Query: How to achieve more realtime output #565

JohnDuncanScott opened this issue Nov 3, 2021 · 2 comments

Comments

@JohnDuncanScott
Copy link

I had a look through the docs and issues but wasn't able to find something specific to this, so apologies if I missed it. If I run a command that outputs a lot of information (like choco install nodejs for example, which installs Node via Chocolatey and has lots of progress output), the output is only shown in 1 flush after the command has been finished. Is there any way of getting Plumbum to output to the console more regularly so you can see the progress of longer running and verbose commands?

@andry81
Copy link

andry81 commented Nov 3, 2021

@JohnDuncanScott
Copy link
Author

Thanks very much :). So looking through that code it seems to bit that triggers realtime are the sys parts:
local["choco"]["install", "nodejs", "-y"].run(stdout = sys.stdout, stderr = sys.stderr)
which seems equivalent to:
local["choco"]["install", "nodejs", "-y"](stdout = sys.stdout, stderr = sys.stderr)

I thought this would essentially be the default, hence the confusion. It would be great if this was included in the documentation somewhere. Also not sure if it's possible to set this as the default somehow to avoid duplicated this everywhere?

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

2 participants