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

Add disable flag to @showprogress to flag on/off #70

Closed
djsegal opened this issue May 15, 2017 · 4 comments
Closed

Add disable flag to @showprogress to flag on/off #70

djsegal opened this issue May 15, 2017 · 4 comments

Comments

@djsegal
Copy link

djsegal commented May 15, 2017

Sometimes you want the progress bar, sometimes you don't

Maybe add verbose flag to @showprogress to allow dynamic usage

@timholy
Copy link
Owner

timholy commented May 17, 2017

I'm not certain I fully understand what you're asking for here, can you be more explicit? Also, have you run the tests locally? They do a nice job of illustrating the diversity of printing options.

@djsegal
Copy link
Author

djsegal commented May 17, 2017

I'll look into the tests


What I meant is something like this:

function foo(bar; verbose=false)
  wait_time = verbose ? 1 : 0

  @showprogress wait_time "Computing..." for i in 1:50
    sleep(0.1)
  end
end

// right now a wait_time of 0 just updates every ms or something

@timholy
Copy link
Owner

timholy commented May 17, 2017

Try changing that to wait_time = verbose ? 1 : Inf.

@MarcMush
Copy link
Collaborator

MarcMush commented Sep 1, 2023

the enabled keyword can disable a progress bar (documented in the readme)

@MarcMush MarcMush closed this as completed Sep 1, 2023
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

3 participants