question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable bar based on a parameter/variable?

See original GitHub issue

Is it possible to disable the bar based on certain conditions? A good example of what I’m saying could be something like:

progress_bar = False
if progress_bar == False:
  # code to disable the progressbar
else:
  #progressbar remains enabled

with alive_bar(100) as bar:
  # Process code

In this case the visibility of alive_bar depends on the value of progress_bar … Another solution that I thought of was writing the process code 2 times to account for the progress_bar value but that is quite unconventional…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sortedcordcommented, Aug 26, 2021

I’m working upon a script in which I’m trying to implement a “quiet mode” sort of thing with no verbose. That’s why I wanted to disable the progress bar based on a certain condition

0reactions
rsalmeicommented, Oct 19, 2021

Hey, version 2.1 is released!! This should be fixed, please report back if anything new arises.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable a button based on a function result - Stack Overflow
You can use a useState variable and set result to it after calling checkChanges() const [valid, setValid] = useState(false); const ...
Read more >
Parameters in Perspectives Story Pages - Socrata Support
Parameters allow you to change a variable, such as a number, date, string, or Boolean, in the definition of a query, which can...
Read more >
Routing — Connexion 3.0.dev0 documentation
The RestyResolver will compose an operationId based on the path and HTTP method ... operationId: api.foo.bar.get # Handler signature: `def get(id, name): ....
Read more >
Slider - AnyLogic Help
In the slider's properties, select the Link to checkbox and choose the parameter/variable from the combo-box to the right: The pop-up list shows...
Read more >
Understanding Windows PowerShell function parameters
This parameter validation attribute accepts an array of values. In the below example, that's 'foo','bar'. param( [Parameter(Mandatory,)]
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found