comparison env/lib/python3.9/site-packages/pip/_vendor/progress/spinner.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
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 = ['⣾', '⣷', '⣯', '⣟', '⡿', '⢿', '⣻', '⣽']