GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Colour widgets by default and cycle spinner colours · wolph/python-progressbar@624ebf2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • docs
    • _ext
      • demo.py
    • _static
      • demos
        • howto-colors.svg
        • howto-iterable-wrapper.svg
        • howto-logging-integration.svg
        • howto-multibar-line-offset.svg
        • howto-multibar.svg
        • howto-non-tty.svg
        • howto-parallel-execution.svg
        • howto-prefix-suffix.svg
        • howto-redirect-stdout.svg
        • howto-tqdm-style.svg
        • howto-unknown-length.svg
        • readme-cli.svg
        • readme-colors.svg
        • readme-hero.svg
        • readme-multibar.svg
        • readme-parallel.svg
        • readme-unknown-length.svg
        • tutorial-step1.svg
        • tutorial-step2.svg
        • tutorial-step3.svg
        • tutorial-step4.svg
        • tutorial-step5.svg
        • widgets-absolute-eta.svg
        • widgets-adaptive-eta.svg
        • widgets-animated-marker.svg
        • widgets-bouncing-bar.svg
        • widgets-counter.svg
        • widgets-eta.svg
        • widgets-format-label.svg
        • widgets-granular-bar.svg
        • widgets-rotating-marker.svg
        • widgets-smoothing-eta.svg
        • widgets-timer.svg
        • widgets-unit-progress.svg
      • livecode
        • livecode.js
        • worker.js
    • examples
      • howto
        • colors.py
        • unknown_length.py
      • readme
        • colors.py
        • unknown_length.py
      • tutorial
        • step2.py
      • widgets
        • animated_marker.py
        • bouncing_bar.py
        • counter.py
        • format_label.py
        • timer.py
        • unit_progress.py
    • howto
      • colors.rst
      • unknown-length.rst
    • tutorial
      • step2.rst
    • widgets
      • animated-marker.rst
      • bouncing-bar.rst
      • counter.rst
      • format-label.rst
      • timer.rst
      • unit-progress.rst
  • progressbar
    • widgets.py
  • scripts
    • build_docs_wheels.py
  • tests
    • console
      • test_console.py
      • test_example_colours.py
    • test_color.py
    • test_docs_wheel_urls.py
    • test_multibar.py
    • test_widget_default_colours.py
    • test_widgets.py

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+6-11Lines changed: 6 additions & 11 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ terminal through one `MultiBar`:
7979
8080
`gradient_colors` shifts a bar's fill color as its percentage grows, so
8181
the download bar sweeps red through gold to green and the render bar
82-
sweeps sky blue into fuchsia. The scan bar has no percentage to sweep
83-
(its length is unknown), so `fixed_colors` gives its animated marker one
84-
unchanging cyan instead.
82+
sweeps sky blue into fuchsia. The scan spinner normally cycles through
83+
colours with its frames. Passing a single cyan colour keeps its colour
84+
unchanged while the marker spins.
8585
"""
8686

8787
import sys
8888
import time
8989

9090
import progressbar
9191
from progressbar.terminal import ColorGradient, colors
92-
from progressbar.widgets import TFixedColors, TGradientColors
92+
from progressbar.widgets import TGradientColors
9393

9494
STEPS = 24
9595

@@ -122,11 +122,8 @@ def main() -> None:
122122
multibar['scan'] = progressbar.ProgressBar(
123123
max_value=progressbar.UnknownLength,
124124
widgets=[
125-
progressbar.Bar(
126-
marker=progressbar.AnimatedMarker(),
127-
fixed_colors=TFixedColors(
128-
fg_none=colors.cyan1, bg_none=None
129-
),
125+
progressbar.AnimatedMarker(
126+
gradient_colors=TGradientColors(fg=colors.cyan1, bg=None),
130127
),
131128
],
132129
)
@@ -350,13 +347,11 @@ with a counter instead of a percentage:
350347
import time
351348

352349
import progressbar
353-
from progressbar.terminal import colors
354350

355351

356352
def main() -> None:
357353
with progressbar.ProgressBar(
358354
max_value=progressbar.UnknownLength,
359-
widget_kwargs={'marker_wrap': colors.cyan1.fg('{}')},
360355
) as bar:
361356
for value in range(0, 120, 10):
362357
bar.update(value)
Collapse file

‎docs/_ext/demo.py‎

Copy file name to clipboardExpand all lines: docs/_ext/demo.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,9 @@ def setup(app: Sphinx) -> dict[str, typing.Any]:
178178
app.add_css_file('livecode/livecode.css')
179179
app.add_js_file('vendor/xterm.js')
180180
app.add_js_file('vendor/addon-fit.js')
181-
app.add_js_file('livecode/livecode.js')
181+
worker_path: pathlib.Path = REPO_ROOT / 'docs/_static/livecode/worker.js'
182+
worker_hash: str = hashlib.sha256(worker_path.read_bytes()).hexdigest()
183+
app.add_js_file(
184+
'livecode/livecode.js', **{'data-worker-version': worker_hash}
185+
)
182186
return {'parallel_read_safe': True, 'parallel_write_safe': True}
Collapse file

‎docs/_static/demos/howto-colors.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-colors.svg
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎docs/_static/demos/howto-iterable-wrapper.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-iterable-wrapper.svg
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎docs/_static/demos/howto-logging-integration.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-logging-integration.svg
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎docs/_static/demos/howto-multibar-line-offset.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-multibar-line-offset.svg
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎docs/_static/demos/howto-multibar.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-multibar.svg
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎docs/_static/demos/howto-non-tty.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-non-tty.svg
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎docs/_static/demos/howto-parallel-execution.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-parallel-execution.svg
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎docs/_static/demos/howto-prefix-suffix.svg‎

Copy file name to clipboardExpand all lines: docs/_static/demos/howto-prefix-suffix.svg
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Loading

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.