Mercurial > repos > guerler > hhblits
comparison lib/python3.8/site-packages/pip/_vendor/progress/spinner.py @ 0:9e54283cc701 draft
"planemo upload commit d12c32a45bcd441307e632fca6d9af7d60289d44"
author | guerler |
---|---|
date | Mon, 27 Jul 2020 03:47:31 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9e54283cc701 |
---|---|
1 # -*- coding: utf-8 -*- | |
2 | |
3 # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> | |
4 # | |
5 # Permission to use, copy, modify, and distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 | |
17 from __future__ import unicode_literals | |
18 from . import Infinite | |
19 | |
20 | |
21 class Spinner(Infinite): | |
22 phases = ('-', '\\', '|', '/') | |
23 hide_cursor = True | |
24 | |
25 def update(self): | |
26 i = self.index % len(self.phases) | |
27 self.write(self.phases[i]) | |
28 | |
29 | |
30 class PieSpinner(Spinner): | |
31 phases = ['◷', '◶', '◵', '◴'] | |
32 | |
33 | |
34 class MoonSpinner(Spinner): | |
35 phases = ['◑', '◒', '◐', '◓'] | |
36 | |
37 | |
38 class LineSpinner(Spinner): | |
39 phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻'] | |
40 | |
41 | |
42 class PixelSpinner(Spinner): | |
43 phases = ['⣾', '⣷', '⣯', '⣟', '⡿', '⢿', '⣻', '⣽'] |