Skip to content

Need help setting progress reports with the shell plugin #758

Closed Answered by jhuckaby
Kiskadee-dev asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there! Thank you for using Cronicle!

Okay, so you have two problems here:

First, Python buffers all output by default (it only actually sends STDOUT in batches at intervals), which we absolutely do NOT want in this case. We want it to output EVERY line as you print it. So you need to disable output auto-buffering. There are several methods to do this. The easiest way is to just add the -u flag to Python when you run your script:

python -u your_script.py

The second problem is, if you want to send progress updates from the Shell Plugin, you need to format the output exactly right. Specifically, you need a percent symbol (%) after the number, and you need to format your number as a percen…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Kiskadee-dev
Comment options

@jhuckaby
Comment options

Answer selected by Kiskadee-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants